package com.ruoyi.paipan.utils;

import com.alibaba.fastjson2.JSON;
import com.ruoyi.paipan.data.OtherData;
import com.ruoyi.paipan.data.StaticDataString;
import org.apache.http.cookie.SM;

import java.io.Serializable;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class ToolUtil {

    /**
     * 动态获取类的静态变量值
     *
     * @param className
     * @param fieldName
     * @return
     */
    public static Object getStaticField(String className, String fieldName) {
        try {
            Class<?> clazz = Class.forName(className);
            return clazz.getField(fieldName).get(null);
        } catch (Exception e) {
            return null;
        }
    }

    public static String cn_substr(String string, int s, int e) {

        String res;
        if (s < 0) {
            res = string.substring(0, string.length() + s);
        } else {
            if (e > 0) res = string.substring(s, s + e);
            else res = string.substring(s);
        }
        return res;
    }

    public static ArrayList<List<Integer>> WuXing(LinkedHashMap<String, List<String>> SX, String ng, String nz, String yg, String yz, String rg, String rz, String sg, String sz) {
        ArrayList<List<String>> a = new ArrayList() {{
            add(Arrays.asList(SX.get(ng).get(0), SX.get(nz).get(0), SX.get(yg).get(0), SX.get(yz).get(0), SX.get(rg).get(0), SX.get(rz).get(0), SX.get(sg).get(0), SX.get(sz).get(0)));
            add(Arrays.asList(SX.get(ng).get(1), SX.get(nz).get(1), SX.get(yg).get(1), SX.get(yz).get(1), SX.get(rg).get(1), SX.get(rz).get(1), SX.get(sg).get(1), SX.get(sz).get(1)));
            add(Arrays.asList(SX.get(SX.get(nz).get(3)).get(0), SX.get(SX.get(yz).get(3)).get(0), SX.get(SX.get(rz).get(3)).get(0), SX.get(SX.get(sz).get(3)).get(0), SX.get(nz).get(4).isEmpty() ? "" : SX.get(SX.get(nz).get(4)).get(0), SX.get(yz).get(4).isEmpty() ? "" : SX.get(SX.get(yz).get(4)).get(0), SX.get(rz).get(4).isEmpty() ? "" : SX.get(SX.get(rz).get(4)).get(0), SX.get(sz).get(4).isEmpty() ? "" : SX.get(SX.get(sz).get(4)).get(0), SX.get(nz).get(5).isEmpty() ? "" : SX.get(SX.get(nz).get(5)).get(0), SX.get(yz).get(5).isEmpty() ? "" : SX.get(SX.get(yz).get(5)).get(0), SX.get(rz).get(5).isEmpty() ? "" : SX.get(SX.get(rz).get(5)).get(0), SX.get(sz).get(5).isEmpty() ? "" : SX.get(SX.get(sz).get(5)).get(0)));
            add(Arrays.asList(SX.get(SX.get(nz).get(3)).get(1), SX.get(SX.get(yz).get(3)).get(1), SX.get(SX.get(rz).get(3)).get(1), SX.get(SX.get(sz).get(3)).get(1), SX.get(nz).get(4).isEmpty() ? "" : SX.get(SX.get(nz).get(4)).get(1), SX.get(yz).get(4).isEmpty() ? "" : SX.get(SX.get(yz).get(4)).get(1), SX.get(rz).get(4).isEmpty() ? "" : SX.get(SX.get(rz).get(4)).get(1), SX.get(sz).get(4).isEmpty() ? "" : SX.get(SX.get(sz).get(4)).get(1), SX.get(nz).get(5).isEmpty() ? "" : SX.get(SX.get(nz).get(5)).get(1), SX.get(yz).get(5).isEmpty() ? "" : SX.get(SX.get(yz).get(5)).get(1), SX.get(rz).get(5).isEmpty() ? "" : SX.get(SX.get(rz).get(5)).get(1), SX.get(sz).get(5).isEmpty() ? "" : SX.get(SX.get(sz).get(5)).get(1)));
        }};
        LinkedHashMap<String, Integer> arrayCountValues = arrayCountValues(a.get(0));
        List<Integer> bzz = Arrays.asList(arrayCountValues.get("0"), arrayCountValues.getOrDefault("1", 0), arrayCountValues.getOrDefault("2", 0), arrayCountValues.getOrDefault("3", 0), arrayCountValues.getOrDefault("4", 0));
        ArrayList<List<Integer>> lists = new ArrayList<>();
        lists.add(bzz);
        return lists;
    }

    public static LinkedHashMap<String, Integer> arrayCountValues(List<String> array) {
        LinkedHashMap<String, Integer> countMap = new LinkedHashMap<>();

        for (String element : array) {
            countMap.put(element, countMap.getOrDefault(element, 0) + 1);
        }

        return countMap;
    }

    public static ArrayList<String> GeJuFenXi(LinkedHashMap<String, LinkedHashMap<String, LinkedHashMap<String, String>>> A, LinkedHashMap<String, List<String>> SX, String ng, String nz, String yg, String yz, String rg, String rz, String sg, String sz) {
        String ngs = A.get(ng).get("占").get("半");
        String ygs = A.get(yg).get("占").get("半");
        String sgs = A.get(sg).get("占").get("半");
        String nzbs = A.get(nz).get("本").get("半");
        String nzzs = A.get(nz).get("中").get("半");
        String nzys = A.get(nz).get("余").get("半");
        String yzbs = A.get(yz).get("本").get("半");
        String yzzs = A.get(yz).get("中").get("半");
        String yzys = A.get(yz).get("余").get("半");
        String rzbs = A.get(rz).get("本").get("半");
        String rzzs = A.get(rz).get("中").get("半");
        String rzys = A.get(rz).get("余").get("半");
        String szbs = A.get(sz).get("本").get("半");
        String szzs = A.get(sz).get("中").get("半");
        String szys = A.get(sz).get("余").get("半");
        List<String> WX = Arrays.asList("金", "木", "水", "火", "土");
        String qybzss = ngs + ygs + sgs + nzbs + nzzs + nzys + yzzs + yzys + rzbs + rzzs + rzys + szbs + szzs + szys;
        LinkedHashMap<String, LinkedHashMap<String, LinkedHashMap<String, String>>> bage = new LinkedHashMap<String, LinkedHashMap<String, LinkedHashMap<String, String>>>() {{
            put("甲", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "偏财格");
                    put("癸", "正印格");
                    put("无", "偏财格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "食神格");
                    put("庚", "七杀格");
                    put("戊", "偏财格");
                    put("无", "食神格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "伤官格");
                    put("己", "正财格");
                    put("无", "伤官格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "正财格");
                    put("丁", "伤官格");
                    put("无", "正财格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "七杀格");
                    put("戊", "偏财格");
                    put("壬", "偏印格");
                    put("无", "七杀格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "正官格");
                    put("无", "正官格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "偏财格");
                    put("辛", "正官格");
                    put("丁", "伤官格");
                    put("无", "偏财格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "偏印格");
                    put("无", "偏印格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "正印格");
                    put("无", "正印格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "正财格");
                    put("癸", "正印格");
                    put("辛", "正官格");
                    put("无", "正财格");
                }});
            }});
            put("乙", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("戊", "正财格");
                    put("丙", "伤官格");
                    put("无", "特殊格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "正财格");
                    put("癸", "偏印格");
                    put("无", "正财格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "伤官格");
                    put("庚", "正官格");
                    put("戊", "正财格");
                    put("无", "伤官格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "食神格");
                    put("己", "偏财格");
                    put("无", "食神格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "偏财格");
                    put("丁", "食神格");
                    put("无", "偏财格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "正官格");
                    put("戊", "正财格");
                    put("壬", "正印格");
                    put("无", "正官格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "七杀格");
                    put("无", "七杀格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "正财格");
                    put("辛", "七杀格");
                    put("丁", "食神格");
                    put("无", "正财格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "正印格");
                    put("无", "正印格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "偏印格");
                    put("无", "偏印格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "偏财格");
                    put("辛", "七杀格");
                    put("癸", "偏印格");
                    put("无", "偏财格");
                }});
            }});
            put("丙", new LinkedHashMap<String, LinkedHashMap<String, String>>() {
                {
                    put("寅", new LinkedHashMap<String, String>() {{
                        put("甲", "偏印格");
                        put("戊", "食神格");
                        put("无", "偏印格");
                    }});
                    put("卯", new LinkedHashMap<String, String>() {{
                        put("乙", "正印格");
                        put("无", "正印格");
                    }});
                    put("辰", new LinkedHashMap<String, String>() {{
                        put("戊", "食神格");
                        put("乙", "正印格");
                        put("癸", "正官格");
                        put("无", "食神格");
                    }});
                    put("巳", new LinkedHashMap<String, String>() {{
                        put("无", "特殊格");
                    }});
                    put("午", new LinkedHashMap<String, String>() {{
                        put("己", "伤官格");
                        put("无", "特殊格");
                    }});
                    put("未", new LinkedHashMap<String, String>() {{
                        put("己", "伤官格");
                        put("乙", "正印格");
                        put("无", "伤官格");
                    }});
                    put("申", new LinkedHashMap<String, String>() {{
                        put("庚", "偏财格");
                        put("戊", "食神格");
                        put("壬", "七杀格");
                        put("无", "偏财格");
                    }});
                    put("酉", new LinkedHashMap<String, String>() {{
                        put("辛", "正财格");
                        put("无", "正财格");
                    }});
                    put("戌", new LinkedHashMap<String, String>() {{
                        put("戊", "食神格");
                        put("辛", "正财格");
                        put("无", "食神格");
                    }});
                    put("亥", new LinkedHashMap<String, String>() {{
                        put("壬", "七杀格");
                        put("甲", "偏印格");
                        put("无", "七杀格");
                    }});
                    put("子", new LinkedHashMap<String, String>() {{
                        put("癸", "正官格");
                        put("无", "正官格");
                    }});
                    put("丑", new LinkedHashMap<String, String>() {{
                        put("己", "伤官格");
                        put("辛", "正财格");
                        put("癸", "正官格");
                        put("无", "伤官格");
                    }});
                }
            });
            put("丁", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "正印格");
                    put("戊", "伤官格");
                    put("无", "正印格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "偏印格");
                    put("无", "偏印格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "伤官格");
                    put("乙", "偏印格");
                    put("癸", "七杀格");
                    put("无", "伤官格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("庚", "正财格");
                    put("戊", "伤官格");
                    put("无", "正财格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "食神格");
                    put("乙", "偏印格");
                    put("无", "食神格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "正财格");
                    put("壬", "正官格");
                    put("戊", "伤官格");
                    put("无", "正财格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "偏财格");
                    put("无", "偏财格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "伤官格");
                    put("辛", "偏财格");
                    put("无", "伤官格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "正官格");
                    put("甲", "正印格");
                    put("无", "正官格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "七杀格");
                    put("无", "七杀格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "食神格");
                    put("辛", "偏财格");
                    put("癸", "七杀格");
                    put("无", "食神格");
                }});
            }});
            put("戊", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "七杀格");
                    put("丙", "偏印格");
                    put("无", "七杀格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "正官格");
                    put("癸", "正财格");
                    put("无", "正官格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("癸", "正财格");
                    put("乙", "正官格");
                    put("无", "特殊格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "正印格");
                    put("无", "正印格");
                    ;
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("丁", "正印格");
                    put("乙", "正官格");
                    put("无", "特殊格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "食神格");
                    put("壬", "偏财格");
                    put("无", "食神格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "伤官格");
                    put("丁", "正印格");
                    put("无", "伤官格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("辛", "伤官格");
                    put("丁", "正印格");
                    put("无", "特殊格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "偏财格");
                    put("甲", "七杀格");
                    put("无", "偏财格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "正财格");
                    put("无", "正财格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("癸", "正财格");
                    put("辛", "伤官格");
                    put("无", "特殊格");
                }});
            }});
            put("己", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "正官格");
                    put("丙", "正印格");
                    put("无", "正官格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "七杀格");
                    put("无", "七杀格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("乙", "七杀格");
                    put("癸", "偏财格");
                    put("无", "特殊格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "正印格");
                    put("庚", "伤官格");
                    put("无", "正印格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("乙", "七杀格");
                    put("丁", "偏印格");
                    put("无", "特殊格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "伤官格");
                    put("壬", "正财格");
                    put("无", "伤官格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "食神格");
                    put("无", "食神格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("丁", "偏印格");
                    put("辛", "食神格");
                    put("无", "特殊格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "正财格");
                    put("甲", "正官格");
                    put("无", "正财格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "偏财格");
                    put("无", "偏财格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("辛", "食神格");
                    put("癸", "偏财格");
                    put("无", "特殊格");
                }});
            }});
            put("庚", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "偏财格");
                    put("丙", "七杀格");
                    put("戊", "偏印格");
                    put("无", "偏财格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "正财格");
                    put("无", "正财格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "偏印格");
                    put("乙", "正财格");
                    put("癸", "伤官格");
                    put("无", "偏印格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "七杀格");
                    put("戊", "偏印格");
                    put("无", "七杀格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "正官格");
                    put("己", "正印格");
                    put("无", "正官格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "正印格");
                    put("乙", "正财格");
                    put("丁", "正官格");
                    put("无", "正印格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "偏印格");
                    put("丁", "正官格");
                    put("无", "偏印格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "食神格");
                    put("甲", "偏财格");
                    put("无", "食神格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "伤官格");
                    put("无", "伤官格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "正印格");
                    put("癸", "伤官格");
                    put("无", "正印格");
                }});
            }});
            put("辛", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "正财格");
                    put("丙", "正官格");
                    put("戊", "正印格");
                    put("无", "正财格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "偏财格");
                    put("无", "偏财格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "正印格");
                    put("乙", "偏财格");
                    put("癸", "食神格");
                    put("无", "正印格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "正官格");
                    put("戊", "正印格");
                    put("无", "正官格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "七杀格");
                    put("己", "偏印格");
                    put("无", "七杀格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "偏印格");
                    put("丁", "七杀格");
                    put("乙", "偏财格");
                    put("无", "偏印格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("壬", "伤官格");
                    put("戊", "偏印格");
                    put("无", "伤官格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "正印格");
                    put("丁", "七杀格");
                    put("无", "正印格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("壬", "伤官格");
                    put("甲", "正财格");
                    put("无", "伤官格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("癸", "食神格");
                    put("无", "食神格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "偏印格");
                    put("癸", "食神格");
                    put("无", "偏印格");
                }});
            }});
            put("壬", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "食神格");
                    put("丙", "偏财格");
                    put("戊", "七杀格");
                    put("无", "食神格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "伤官格");
                    put("无", "伤官格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "七杀格");
                    put("乙", "伤官格");
                    put("无", "七杀格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "偏财格");
                    put("庚", "偏印格");
                    put("戊", "七杀格");
                    put("无", "偏财格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "正财格");
                    put("己", "正官格");
                    put("无", "正财格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "正官格");
                    put("丁", "正财格");
                    put("乙", "伤官格");
                    put("无", "正官格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "偏印格");
                    put("戊", "七杀格");
                    put("无", "偏印格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "正印格");
                    put("无", "正印格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "七杀格");
                    put("丁", "正财格");
                    put("辛", "正印格");
                    put("无", "七杀格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "正官格");
                    put("癸", "正印格");
                    put("无", "正官格");
                }});
            }});
            put("癸", new LinkedHashMap<String, LinkedHashMap<String, String>>() {{
                put("寅", new LinkedHashMap<String, String>() {{
                    put("甲", "伤官格");
                    put("丙", "正财格");
                    put("戊", "正官格");
                    put("无", "伤官格");
                }});
                put("卯", new LinkedHashMap<String, String>() {{
                    put("乙", "食神格");
                    put("无", "食神格");
                }});
                put("辰", new LinkedHashMap<String, String>() {{
                    put("戊", "正官格");
                    put("乙", "食神格");
                    put("无", "正官格");
                }});
                put("巳", new LinkedHashMap<String, String>() {{
                    put("丙", "正财格");
                    put("戊", "正官格");
                    put("庚", "正印格");
                    put("无", "正官格");
                }});
                put("午", new LinkedHashMap<String, String>() {{
                    put("丁", "偏财格");
                    put("乙", "七杀格");
                    put("无", "偏财格");
                }});
                put("未", new LinkedHashMap<String, String>() {{
                    put("己", "七杀格");
                    put("丁", "偏财格");
                    put("乙", "食神格");
                    put("无", "七杀格");
                }});
                put("申", new LinkedHashMap<String, String>() {{
                    put("庚", "正印格");
                    put("戊", "正官格");
                    put("无", "正印格");
                }});
                put("酉", new LinkedHashMap<String, String>() {{
                    put("辛", "偏印格");
                    put("无", "偏印格");
                }});
                put("戌", new LinkedHashMap<String, String>() {{
                    put("戊", "正官格");
                    put("丁", "偏财格");
                    put("辛", "偏印格");
                    put("无", "正官格");
                }});
                put("亥", new LinkedHashMap<String, String>() {{
                    put("甲", "伤官格");
                    put("无", "特殊格");
                }});
                put("子", new LinkedHashMap<String, String>() {{
                    put("无", "特殊格");
                }});
                put("丑", new LinkedHashMap<String, String>() {{
                    put("己", "七杀格");
                    put("辛", "偏印格");
                    put("无", "七杀格");
                }});
            }});
        }};
        ArrayList<String> sc = new ArrayList<>();
        if ("甲乙".contains(rg) && "寅卯辰".contains(yz)) {
            if (!(ng + nz + yg + rz + sz).contains("庚") && !(ng + nz + yg + rz + sz).contains("辛") && !(ng + nz + yg + rz + sz).contains("申") && !(ng + nz + yg + rz + sz).contains("酉")) {
                if ((nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("卯") && (nz + yz + rz + sz).contains("辰")) {
                    sc.add("曲直格");
                }
                if ((nz + yz + rz + sz).contains("亥") && (nz + yz + rz + sz).contains("卯") && (nz + yz + rz + sz).contains("未")) {
                    sc.add("曲直格");
                }
            }
        }
        if ("丙丁".contains(rg) && "巳午未".contains(yz)) {
            if (!(ng + nz + yg + rz + sz).contains("壬") && !(ng + nz + yg + rz + sz).contains("癸") && !(ng + nz + yg + rz + sz).contains("亥") && !(ng + nz + yg + rz + sz).contains("子")) {
                if ((nz + yz + rz + sz).contains("巳") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("未")) {
                    sc.add("炎上格");
                }
                if ((nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("戌")) {
                    sc.add("炎上格");
                }
            }
        }
        if ("戊己".contains(rg) && "辰戌丑未".contains(yz)) {
            if (!(ng + nz + yg + rz + sz).contains("甲") && !(ng + nz + yg + rz + sz).contains("乙") && !(ng + nz + yg + rz + sz).contains("寅") && !(ng + nz + yg + rz + sz).contains("卯")) {
                if ("辰戌丑未".contains(nz) && "辰戌丑未".contains(rz) && "辰戌丑未".contains(sz)) {
                    sc.add("稼穑格");
                }
            }
        }
        if ("庚辛".contains(rg) && "申酉戌".contains(yz)) {
            if (!(ng + nz + yg + rz + sz).contains("丙") && !(ng + nz + yg + rz + sz).contains("丁") && !(ng + nz + yg + rz + sz).contains("午")) {
                if ((nz + yz + rz + sz).contains("申") && (nz + yz + rz + sz).contains("酉") && (nz + yz + rz + sz).contains("戌")) {
                    sc.add("从革格");
                }
                if ((nz + yz + rz + sz).contains("巳") && (nz + yz + rz + sz).contains("酉") && (nz + yz + rz + sz).contains("丑")) {
                    sc.add("从革格");
                }
            }
        }
        if ("壬癸".contains(rg) && "亥子丑".contains(yz)) {
            if (!(ng + nz + yg + rz + sz).contains("戊") && !(ng + nz + yg + rz + sz).contains("己") && !(ng + nz + yg + rz + sz).contains("未") && !(ng + nz + yg + rz + sz).contains("戌")) {
                if ((nz + yz + rz + sz).contains("亥") && (nz + yz + rz + sz).contains("子") && (nz + yz + rz + sz).contains("丑")) {
                    sc.add("润下格");
                }
                if ((nz + yz + rz + sz).contains("申") && (nz + yz + rz + sz).contains("子") && (nz + yz + rz + sz).contains("辰")) {
                    sc.add("润下格");
                }
            }
        }
        if (Objects.equals(yzbs, "⁢财") || Objects.equals(yzbs, "⁢才")) {
            if (CommonUtil.tgdzly(ng + yg + rg + sg).contains(WX.get(Integer.parseInt(SX.get(yz).get(0)))) || (ngs + ygs + sgs).contains("财") || (ngs + ygs + sgs).contains("才")) {
                if (CommonUtil.tgdzly(nz + yz + rz + sz).contains(WX.get(Integer.parseInt(SX.get(yz).get(0)))) || (nzbs + rzbs + szbs).contains("财") || (nzbs + rzbs + szbs).contains("才")) {
                    sc.add("从财格");
                }
            }
        }
        if (Objects.equals(yzbs, "⁢杀")) {
            if (substrCount(qybzss, "杀") > 2 && !qybzss.contains("印")) {
                sc.add("从杀格");
            }
        }
        if (Objects.equals(yzbs, "⁢官")) {
            if (substrCount(qybzss, "官") > 2 && !qybzss.contains("印")) {
                sc.add("从官格");
            }
        }
        if (Objects.equals(yzbs, "⁢食") || Objects.equals(yzbs, "⁢伤")) {
            if (!qybzss.contains("印")) {
                int ss = substrCount(qybzss, "食") + substrCount(qybzss, "伤");
                if (ss > 1 || CommonUtil.tgdzly(ng + yg + rg + sg).contains(WX.get(Integer.parseInt(SX.get(yz).get(0))))) {
                    if (CommonUtil.tgdzly(nz + yz + rz + sz).contains(WX.get(Integer.parseInt(SX.get(yz).get(0))))) {
                        sc.add("从儿格");
                    }
                }
            }
        }
        if (Objects.equals(yzbs, "⁢比") || Objects.equals(yzbs, "⁢劫")) {
            if (!qybzss.contains("官") && !qybzss.contains("杀")) {
                int ss = substrCount(qybzss, "比") + substrCount(qybzss, "劫") + substrCount(qybzss, "印") + substrCount(qybzss, "枭");
                if (ss > 4) {
                    sc.add("从旺格");
                }
            }
        }
        if (Objects.equals(yzbs, "⁢比") || Objects.equals(yzbs, "⁢劫")) {
            if (!qybzss.contains("官") && !qybzss.contains("杀") && !qybzss.contains("财") && !qybzss.contains("才")) {
                int ss = substrCount(qybzss, "比") + substrCount(qybzss, "劫") + substrCount(qybzss, "印") + substrCount(qybzss, "枭");
                if (ss > 5) {
                    sc.add("从强格");
                }
            }
        }
        ArrayList<List<String>> hqg = new ArrayList<List<String>>() {{
            add(Arrays.asList("甲己", "辰戌丑未", "甲乙寅卯", "化土格"));
            add(Arrays.asList("乙庚", "巳酉丑申", "丙丁巳午", "化金格"));
            add(Arrays.asList("丙辛", "申子辰亥", "戊己未戌", "化水格"));
            add(Arrays.asList("丁壬", "亥卯未寅", "庚辛申酉", "化木格"));
            add(Arrays.asList("戊癸", "寅午戌巳", "壬癸亥子", "化火格"));
        }};
        for (List<String> v : hqg) {
            if (Objects.equals(v.get(0), yg + rg) || Objects.equals(v.get(0), rg + yg) || Objects.equals(v.get(0), sg + rg) || Objects.equals(v.get(0), rg + sg)) {
                if (v.get(1).contains(yz) && !v.get(2).contains(ng) && !v.get(2).contains(nz) && !v.get(2).contains(rz) && !v.get(2).contains(sz)) {
                    sc.add(v.get(3));
                }
                break;
            }
        }
        String tttt = "";
        for (String k : bage.get(rg).get(yz).keySet()) {
            LinkedHashMap<String, LinkedHashMap<String, String>> v = bage.get(k);
            if ((ng + yg + sg).contains(k)) {
                tttt = k;
                break;
            }

        }
        if (tttt.isEmpty()) {
            String wu = bage.get(rg).get(yz).get("无");
            if (!Objects.equals(wu, "特殊格")) {
                sc.add(wu);
            }
        } else {
            String s = bage.get(rg).get(yz).get(tttt);
            if (s != null)
                sc.add(bage.get(rg).get(yz).get(tttt));
        }
        if ("甲寅乙卯丙巳戊巳丁午己午庚申辛酉壬亥癸子".contains(rg + yz)) {
            sc.add("建禄格");
        }
        if ("甲卯丙午庚酉壬子乙寅丁巳己巳辛申癸亥".contains(rg + yz)) {
            sc.add("月刃格");
        }
        if (sc.isEmpty()) {
            sc.add("无格局");
        }
        return sc;
    }

    //喜忌数量统计
    public static List<Object> XJTongJi(LinkedHashMap<String, List<String>> SX, String rg, List<String> gz) {
        ArrayList<Object> wxsz = new ArrayList<Object>() {{
            add(Arrays.asList(4, 0));
            add(Arrays.asList(2, 1));
            add(Arrays.asList(0, 2));
            add(Arrays.asList(1, 3));
            add(Arrays.asList(3, 4));
            add(1);
        }};
        //生助
        ArrayList<Object> wxkxh = new ArrayList<Object>() {{
            add(Arrays.asList(1, 2, 3));
            add(Arrays.asList(0, 3, 4));
            add(Arrays.asList(1, 3, 4));
            add(Arrays.asList(0, 2, 4));
            add(Arrays.asList(0, 1, 2));
            add(2);
        }};
//克泄耗
        int ceshi = 0;
        for (int i = 0; i <= 1; i++) {
            for (String s : gz) {
                List<Integer> o = (List<Integer>) wxsz.get(Integer.parseInt(SX.get(rg).get(0)));
                ceshi += o.get(i) == Integer.parseInt(SX.get(s).get(0)) ? 1 : 0;
            }
        }
        int kxh = gz.size() - ceshi;
        return Arrays.asList(ceshi, kxh, wxsz.get(Integer.parseInt(SX.get(rg).get(0))), wxkxh.get(Integer.parseInt(SX.get(rg).get(0))));
    }

    public static LinkedHashMap<String, Object> PHYongShen(LinkedHashMap<String, List<String>> SX, String ng, String nz, String yg, String yz, String rg, String rz, String sg, String sz) {
        List<Object> WJBF = XJTongJi(SX, rg, Arrays.asList(ng, yg, sg, nz, yz, rz, sz));
        LinkedHashMap<String, LinkedHashMap<String, Double>> tgsz = JSON.parseObject(StaticDataString.readFromProperties("tgsz"), LinkedHashMap.class);
        LinkedHashMap<String, LinkedHashMap<String, LinkedHashMap<String, Double>>> dzsz = JSON.parseObject(StaticDataString.readFromProperties("dzsz"), LinkedHashMap.class);
        LinkedHashMap<String, Object> tjsz = new LinkedHashMap<>();
        tjsz.put(SX.get(ng).get(0), tgsz.get(yz).get(ng));
        LinkedHashMap<String, Double> v1 = tgsz.containsKey(yz) ? tgsz.get(yz) : new LinkedHashMap<>();
        tjsz.put(SX.get(yg).get(0), Double.parseDouble(String.valueOf((tjsz.containsKey(SX.get(yg).get(0)) ? Double.valueOf(String.valueOf(tjsz.get(SX.get(yg).get(0)))) : 0.0))) + Double.parseDouble(String.valueOf(v1.getOrDefault(yg, 0.0))));
        tjsz.put(SX.get(rg).get(0), Double.parseDouble(String.valueOf((tjsz.containsKey(SX.get(rg).get(0)) ? Double.valueOf(String.valueOf(tjsz.get(SX.get(rg).get(0)))) : 0.0))) + Double.parseDouble(String.valueOf(v1.getOrDefault(rg, 0.0))));
        tjsz.put(SX.get(sg).get(0), Double.parseDouble(String.valueOf((tjsz.containsKey(SX.get(sg).get(0)) ? Double.valueOf(String.valueOf(tjsz.get(SX.get(sg).get(0)))) : 0.0))) + Double.parseDouble(String.valueOf(v1.getOrDefault(sg, 0.0))));
        for (String k : dzsz.get(yz).get(nz).keySet()) {
            Double v = Double.parseDouble(String.valueOf(dzsz.get(yz).get(nz).get(k)));
            tjsz.put(SX.get(k).get(0), Double.valueOf(String.valueOf(tjsz.getOrDefault(SX.get(k).get(0), 0))) + v);
        }
        for (String k : dzsz.get(yz).get(yz).keySet()) {
            Double v = Double.parseDouble(String.valueOf(dzsz.get(yz).get(yz).get(k)));
            tjsz.put(SX.get(k).get(0), Double.valueOf(String.valueOf(tjsz.getOrDefault(SX.get(k).get(0), 0))) + v);
        }
        for (String k : dzsz.get(yz).get(rz).keySet()) {
            Double v = Double.parseDouble(String.valueOf(dzsz.get(yz).get(rz).get(k)));
            tjsz.put(SX.get(k).get(0), Double.valueOf(String.valueOf(tjsz.getOrDefault(SX.get(k).get(0), 0))) + v);
        }
        for (String k : dzsz.get(yz).get(sz).keySet()) {
            Double v = Double.parseDouble(String.valueOf(dzsz.get(yz).get(sz).get(k)));
            tjsz.put(SX.get(k).get(0), Double.valueOf(String.valueOf(tjsz.getOrDefault(SX.get(k).get(0), 0))) + v);
        }
        List<Integer> temp = (List<Integer>) WJBF.get(2);
        List<Integer> temp1 = (List<Integer>) WJBF.get(3);
        for (Integer v : temp) {
            tjsz.put("5", (Double) tjsz.getOrDefault("5", 0.0) + (Double) tjsz.getOrDefault(v.toString(),0.0));
        }
        for (Integer v : temp1) {
            tjsz.put("6", Double.valueOf(String.valueOf(tjsz.getOrDefault("6", 0.0))) + Double.valueOf(String.valueOf(tjsz.getOrDefault(v.toString(),0.0))));
        }
        DecimalFormat df = new DecimalFormat("#.##");
        df.setRoundingMode(RoundingMode.HALF_UP);
        tjsz.put("0", Double.valueOf(df.format(tjsz.getOrDefault("0",0.0))));
        tjsz.put("1", Double.valueOf(df.format(tjsz.getOrDefault("1",0.0))));
        tjsz.put("2", Double.valueOf(df.format(tjsz.getOrDefault("2",0.0))));
        tjsz.put("3", Double.valueOf(df.format(tjsz.getOrDefault("3",0.0))));
        tjsz.put("4", Double.valueOf(df.format(tjsz.getOrDefault("4",0.0))));
        tjsz.put("5", Double.valueOf(df.format(tjsz.getOrDefault("5",0.0))));
        tjsz.put("6", Double.valueOf(df.format(tjsz.getOrDefault("6",0.0))));
        tjsz.put("7", Double.valueOf(df.format((Double) tjsz.getOrDefault("5",0.0) + (Double) tjsz.getOrDefault("6",0.0))));
        tjsz.put("8", (double) Math.round((Double) tjsz.getOrDefault("5",0.0) / (Double) tjsz.getOrDefault("7",1) * 100));
        tjsz.put("9", (double) Math.round((Double) tjsz.getOrDefault("6",0.0) / (Double) tjsz.getOrDefault("7",1) * 100));
        if (tjsz.get("8").equals(tjsz.get("9"))) {
            tjsz.put("10", "均衡");
        }
        if ((Double) tjsz.get("8") > (Double) tjsz.get("9")) {
            tjsz.put("10", "强");
        }
        if ((Double) tjsz.get("8") < (Double) tjsz.get("9")) {
            tjsz.put("10", "弱");
        }
        return tjsz;
    }

    public static LinkedHashMap<Integer, String> THYongShen(LinkedHashMap<String, List<String>> SX, String ng, String nz, String yg, String yz, String rg, String rz, String sg, String sz) {
        LinkedHashMap<String, Double> GZYYQ = new LinkedHashMap<String, Double>() {{
            put("甲", 3.0);
            put("乙", 1.0);
            put("丙", 7.0);
            put("丁", 5.0);
            put("戊", 1.0);
            put("己", -1.0);
            put("庚", -1.0);
            put("辛", -3.0);
            put("壬", -5.0);
            put("癸", -7.0);
            put("寅", 3.0);
            put("卯", 1.0);
            put("辰", 2.0);
            put("巳", 7.0);
            put("午", 5.0);
            put("未", 6.0);
            put("申", -1.0);
            put("酉", -3.0);
            put("戌", -2.0);
            put("亥", -5.0);
            put("子", -7.0);
            put("丑", -6.0);
        }};
        if ("寅卯辰".contains(yz)) {
            GZYYQ.put("寅", GZYYQ.get("寅") * 1.2);
            GZYYQ.put("卯", GZYYQ.get("卯") * 1.2);
            GZYYQ.put("辰", GZYYQ.get("辰") * 1.2);
            GZYYQ.put("甲", GZYYQ.get("甲") * 1.2);
            GZYYQ.put("乙", GZYYQ.get("乙") * 1.2);
        }
        if ("巳午未".contains(yz)) {
            GZYYQ.put("巳", GZYYQ.get("巳") * 1.2);
            GZYYQ.put("午", GZYYQ.get("午") * 1.2);
            GZYYQ.put("未", GZYYQ.get("未") * 1.2);
            GZYYQ.put("丙", GZYYQ.get("丙") * 1.2);
            GZYYQ.put("丁", GZYYQ.get("丁") * 1.2);
        }
        if ("申酉戌".contains(yz)) {
            GZYYQ.put("申", GZYYQ.get("申") * 1.2);
            GZYYQ.put("酉", GZYYQ.get("酉") * 1.2);
            GZYYQ.put("戌", GZYYQ.get("戌") * 1.2);
            GZYYQ.put("庚", GZYYQ.get("庚") * 1.2);
            GZYYQ.put("辛", GZYYQ.get("辛") * 1.2);
        }
        if ("亥子丑".contains(yz)) {
            GZYYQ.put("亥", GZYYQ.get("亥") * 1.2);
            GZYYQ.put("子", GZYYQ.get("子") * 1.2);
            GZYYQ.put("丑", GZYYQ.get("丑") * 1.2);
            GZYYQ.put("壬", GZYYQ.get("壬") * 1.2);
            GZYYQ.put("癸", GZYYQ.get("癸") * 1.2);
        }
        LinkedHashMap<Integer, String> ss = new LinkedHashMap<>();
        DecimalFormat df = new DecimalFormat("#.##");
        df.setRoundingMode(RoundingMode.HALF_UP);
        ss.put(0, df.format(GZYYQ.get(ng) + GZYYQ.get(yg) + GZYYQ.get(rg) + GZYYQ.get(sg) + GZYYQ.get(nz) + GZYYQ.get(yz) + GZYYQ.get(rz) + GZYYQ.get(sz)));
        double s = Double.parseDouble(ss.get(0));
        if (s < -7) ss.put(1, "极阴");
        if (s > 7) ss.put(1, "极阳");
        if (s >= -7 && s < 0) ss.put(1, "偏阴");
        if (s <= 7 && s > 0) ss.put(1, "偏阳");
        if (s == 0) ss.put(1, "均衡");
        return ss;
    }

    public static List<Object> PDXiYongShen(LinkedHashMap<String, List<String>> SX, String ng, String nz, String yg, String yz, String rg, String rz, String sg, String sz) {
        ArrayList<String> xxx = new ArrayList<>();
        String bzyjgz = ng + nz + yg + yz + rz + sg + sz;
        List<Object> WJBF = XJTongJi(SX, rg, Arrays.asList(ng, yg, sg, nz, yz, rz, sz));
        LinkedHashMap<String, Object> PHYongShen = PHYongShen(SX, ng, nz, yg, yz, rg, rz, sg, sz);
        LinkedHashMap<Integer, String> THYongShen = THYongShen(SX, ng, nz, yg, yz, rg, rz, sg, sz);
        int i = 0;
        if (PHYongShen.get("10") == "强") i = 3;
        if (PHYongShen.get("10") == "弱") i = 2;
        if (PHYongShen.get("10") == "均衡") i = 99;
        int size = WJBF.size();
        if (i >= 0 && i <= 99) {
            if(i < size){
                List<Integer> o = (List<Integer>) WJBF.get(i);
                for (Integer v : o) {
                    for (String k : SX.keySet()) {
                        List<String> kk = SX.get(k);
                        if (bzyjgz.contains(k) && Integer.parseInt(kk.get(0)) == v) {
                            xxx.add(k);
                        }
                    }
                }
            }

        }
        ArrayList<List<Object>> GZYYQ = new ArrayList<List<Object>>() {{
            add(Arrays.asList("甲", 3));
            add(Arrays.asList("乙", 1));
            add(Arrays.asList("丙", 7));
            add(Arrays.asList("丁", 5));
            add(Arrays.asList("戊", 1));
            add(Arrays.asList("己", -1));
            add(Arrays.asList("庚", -1));
            add(Arrays.asList("辛", -3));
            add(Arrays.asList("壬", -5));
            add(Arrays.asList("癸", -7));
            add(Arrays.asList("寅", 3));
            add(Arrays.asList("卯", 1));
            add(Arrays.asList("辰", 2));
            add(Arrays.asList("巳", 7));
            add(Arrays.asList("午", 5));
            add(Arrays.asList("未", 6));
            add(Arrays.asList("申", -1));
            add(Arrays.asList("酉", -3));
            add(Arrays.asList("戌", -2));
            add(Arrays.asList("亥", -5));
            add(Arrays.asList("子", -7));
            add(Arrays.asList("丑", -6));
        }};
        int target = 0;
        LinkedHashMap<String, Double> closestNums = new LinkedHashMap<>();
        double diff;
        for (List<Object> item : GZYYQ) {
            double s = Double.parseDouble(String.valueOf(item.get(1))) + Double.parseDouble(THYongShen.get(0));
            diff = Math.abs(s - target);
            closestNums.put((String) item.get(0), diff);
        }
        List<Map.Entry<String, Double>> list = new ArrayList<>(closestNums.entrySet());
        list.sort(Map.Entry.comparingByValue());
        ArrayList<String> result = new ArrayList<>();
        for (Map.Entry<String, Double> entry : list) {
            result.add(entry.getKey());
            if (result.size() == 4) {
                break;
            }
        }
        Stream<String> stringStream = result.stream().filter(bzyjgz::contains);
        result = (ArrayList<String>) stringStream.collect(Collectors.toList());
        ArrayList<String> xxb = new ArrayList<>();
        ArrayList<String> newList = new ArrayList<>(xxx);
        newList.addAll(result);
        int xxxzgs = newList.size();
        LinkedHashMap<String, Integer> countValues = new LinkedHashMap<>();
        for (String value : newList) {
            countValues.put(value, countValues.getOrDefault(value, 0) + 1);
        }

        // 按值逆序排序
        List<Map.Entry<String, Integer>> sortedList = new ArrayList<>(countValues.entrySet());
        sortedList.sort((e1, e2) -> e2.getValue().compareTo(e1.getValue())); // 逆序排序
        for (Map.Entry<String, Integer> entry : sortedList) {
            String key = entry.getKey();
            Integer value = entry.getValue();
            String formattedString = key + "(" + Math.round((value.doubleValue() / xxxzgs) * 100) + "%) ";
            xxb.add(formattedString);
        }
        Iterator<String> iterator = countValues.keySet().iterator();
        String currentKey = "";
        if (iterator.hasNext()) {
            currentKey = iterator.next();
        }
        return Arrays.asList(currentKey, xxb);
    }

    public static List<Object> XS(String ng, String nz, String yg, String yz, String rg, String rz, String sg, String sz, Integer sex, LinkedHashMap<String, List<String>> NY, LinkedHashMap<String, List<String>> SX, String[] LLXS, String zhuanyeban) {
        String ztg = ng + yg + rg + sg;
        String zzg = OtherData.SX.get(nz).get(3) + OtherData.SX.get(nz).get(4) + OtherData.SX.get(nz).get(5) + OtherData.SX.get(yz).get(3) + OtherData.SX.get(yz).get(4) + OtherData.SX.get(yz).get(5) + OtherData.SX.get(rz).get(3) + OtherData.SX.get(rz).get(4) + OtherData.SX.get(rz).get(5) + OtherData.SX.get(sz).get(3) + OtherData.SX.get(sz).get(4) + OtherData.SX.get(sz).get(5);
        String s = NY.get(ng + nz).get(0);
        String NYWX = s.substring(s.length()-1);
        String Z1 = "白虎兼刃";
        String Z7 = "阴阳差错";
        String Z11 = "金神";
        String Z15 = "词馆";
        String Z16 = "天德贵人";
        String Z17 = "月德贵人";
        String Z18 = "将星";
        String Z19 = "丧门";
        String Z20 = "六厄";
        String Z21 = "病符";
        String Z22 = "灾煞";
        String Z23 = "华盖";
        String Z25 = "劫煞";
        String Z26 = "红鸾";
        String Z27 = "桃花";
        String Z28 = "寡宿";
        String Z29 = "吊客";
        String Z30 = "孤辰";
        String Z31 = "天喜";
        String Z32 = "驿马";
        String Z33 = "亡神";
        String Z34 = "披麻";
        String Z35 = "天医";
        String Z37 = "死符";
        String Z41 = "学堂";
        String Z44 = "福星贵人";
        String Z45 = "太极贵人";
        String Z46 = "天厨贵人";
        String Z47 = "文昌贵人";
        String Z48 = "国印贵人";
        String Z49 = "天官贵人";
        String Z50 = "红艳";
        String Z51 = "金舆";
        String Z53 = "天乙贵人";
        String Z55 = "羊刃";
        String Z56 = "禄神";
        String Z58 = "飞刃";
        String Z60 = "日德贵人";
        String Z61 = "童子煞";
        String Z96 = "天德合";
        String Z109 = "三奇贵人";
        String Z113 = "官印贵人";
        String Z140 = "孤鸾寡鹊";
        String Z141 = "勾煞";
        String Z142 = "绞煞";
        String Z143 = "元辰";
        String Z149 = "空亡";
        String Z155 = "十灵日";
        String Z156 = "十恶大败";
        String Z157 = "四废";
        String Z158 = "自坐红艳";
        String Z159 = "天罗地网";
        String Z206 = "德秀贵人";
        String Z0 = "害太岁";
        String Z2 = "纸簸箕";
        String Z3 = "天转杀";
        String Z4 = "地转杀";
        String Z5 = "天赦";
        String Z6 = "犯天狗";
        String Z9 = "原局桃花";
        String Z10 = "破太岁";
        String Z12 = "孤鸾煞";
        String Z13 = "刑太岁";
        String Z24 = "埋儿煞";
        String Z36 = "天灾煞";
        String Z40 = "自缢煞";
        String Z42 = "五鬼星";
        String Z43 = "阴注阳受";
        String Z52 = "水溺煞";
        String Z54 = "阴阳煞";
        String Z57 = "流霞";
        String Z59 = "统缢煞";
        String Z62 = "绝火烟";
        String Z63 = "苦焦";
        String Z64 = "骨髓破";
        String Z65 = "隔角煞";
        String Z67 = "六秀日";
        String Z68 = "八专日";
        String Z69 = "铁板煞";
        String Z70 = "九丑日";
        String Z71 = "指背煞";
        String Z73 = "天刑煞";
        String Z74 = "破碎煞";
        String Z75 = "伤死煞";
        String Z76 = "破率";
        String Z78 = "火德贵人";
        String Z79 = "拱禄";
        String Z81 = "斗牛煞";
        String Z86 = "活曜";
        String Z87 = "天屠煞";
        String Z88 = "五鬼精神煞";
        String Z90 = "裁锋煞";
        String Z92 = "攀鞍";
        String Z95 = "墓杀";
        String Z97 = "倾国倾城";
        String Z99 = "地狱";
        String Z100 = "独火";
        String Z101 = "浮沉杀";
        String Z102 = "妨害杀";
        String Z103 = "天耗";
        String Z105 = "平头煞";
        String Z106 = "悬梁煞";
        String Z107 = "血刃";
        String Z110 = "血支";
        String Z111 = "值太岁";
        String Z112 = "冲太岁";
        String Z114 = "乞丐贵人";
        String Z115 = "财神贵人";
        String Z116 = "六亲贵人";
        String Z117 = "长生煞";
        String Z118 = "裸体桃花";
        String Z119 = "真桃花";
        String Z120 = "正桃花";
        String Z121 = "贫穷煞";
        String Z122 = "再嫁煞";
        String Z123 = "披头煞";
        String Z124 = "吞啖煞";
        String Z125 = "绝梁煞";
        String Z126 = "铁秋煞";
        String Z128 = "华盖自墓";
        String Z129 = "寡妇煞";
        String Z130 = "铁扫帚";
        String Z131 = "冰消瓦解";
        String Z133 = "将军一箭";
        String Z134 = "将军二箭";
        String Z135 = "将军三箭";
        String Z136 = "将军四箭";
        String Z137 = "将军弓";
        String Z138 = "天扫星";
        String Z139 = "地扫星";
        String Z144 = "冲天杀";
        String Z146 = "破煞";
        String Z150 = "欺君之罪";
        String Z151 = "淫魔降世";
        String Z152 = "红颜祸乱";
        String Z153 = "快马加鞭";
        String Z154 = "东抄西转";
        String Z160 = "驳婚煞";
        String Z161 = "六畜";
        String Z162 = "日贵星";
        String Z163 = "夜贵星";
        String Z164 = "旺夫煞";
        String Z165 = "挂剑煞";
        String Z166 = "天火煞";
        String Z167 = "苦难煞";
        String Z168 = "残花煞";
        String Z169 = "红煞日";
        String Z170 = "黄煞日";
        String Z171 = "天难日";
        String Z172 = "穷苦日";
        String Z173 = "威胁日";
        String Z175 = "望门寡煞";
        String Z176 = "偷生煞";
        String Z177 = "无后煞";
        String Z178 = "劫路";
        String Z179 = "夫妻煞";
        String Z180 = "厅堂煞";
        String Z181 = "暗金煞";
        String Z182 = "扫铁床";
        String Z185 = "连珠刃";
        String Z186 = "刃头鬼";
        String Z187 = "刃头财";
        String Z188 = "离母煞";
        String Z189 = "离父煞";
        String Z190 = "真太岁";
        String Z191 = "枭水食火";
        String Z192 = "枭金食木";
        String Z193 = "枭木食土";
        String Z194 = "枭土食水";
        String Z195 = "枭火食金";
        String Z196 = "年运空亡";
        String Z197 = "月运空亡";
        String Z198 = "日运空亡";
        String Z199 = "时运空亡";
        String Z200 = "三丘五墓";
        String Z201 = "年日空亡";
        String Z202 = "日时空亡";
        String Z203 = "四大空亡";
        String Z205 = "官符";
        String Z207 = "马倒禄绝";
        String Z208 = "年天克地冲";
        String Z209 = "月天克地冲";
        String Z210 = "日天克地冲";
        String Z211 = "时天克地冲";
        String Z212 = "追魂铲度I型";
        String Z213 = "追魂铲度II型";
        String Z214 = "追魂铲度III型";
        String Z215 = "鬼限I型";
        String Z216 = "鬼限II型";
        String Z217 = "大运冲堤";
        String Z218 = "十干败亡";
        String Z219 = "随林禄马";
        String Z220 = "禄马同槽";
        String Z225 = "绝夫魁罡";
        String Z226 = "绝妻魁罡";
        String Z227 = "白虎魁罡";
        LinkedHashMap<String, String> baihujianren = new LinkedHashMap<String, String>() {{
            put("子壬申", Z1);
            put("丑癸酉", Z1);
            put("戌丙午", Z1);
            put("亥己未", Z1);
            put("亥丁未", Z1);
            put("辰壬子", Z1);
            put("巳癸丑", Z1);
            put("午丙寅", Z1);
            put("未己卯", Z1);
            put("未丁卯", Z1);
            put("寅戌", Z1);
            put("卯亥", Z1);
            put("申辰", Z1);
            put("酉巳", Z1);
        }};
        String Z14 = "断桥关";
        String Z38 = "娘娘关";
        String Z39 = "短命关";
        String Z66 = "断肠关";
        String Z72 = "撞命关";
        String Z77 = "汤火关";
        String Z80 = "悬梁关";
        String Z82 = "雷公关";
        String Z83 = "天吊关";
        String Z84 = "四季关";
        String Z85 = "千日关";
        String Z89 = "土牢关";
        String Z91 = "四柱关";
        String Z93 = "急脚关";
        String Z94 = "金锁关";
        String Z98 = "落井关";
        String Z104 = "五鬼关";
        String Z108 = "铁锁关";
        String Z127 = "血光关";
        String Z132 = "阎罗关";
        String Z145 = "百日关";
        String Z147 = "鬼门关";
        String Z148 = "休庵关";
        String Z174 = "格局关";
        String Z183 = "朱雀关";
        String Z184 = "浴盆关";
        String Z204 = "基败关";
        String Z221 = "直难关";
        String Z222 = "鸡飞关";
        String Z223 = "铁蛇关";
        String Z224 = "水火关";
        LinkedHashMap<String, String> yinyangchacuo = new LinkedHashMap<String, String>() {{
            put("丙子", Z7);
            put("丁丑", Z7);
            put("戊寅", Z7);
            put("辛卯", Z7);
            put("壬辰", Z7);
            put("癸巳", Z7);
            put("丙午", Z7);
            put("丁未", Z7);
            put("戊申", Z7);
            put("辛酉", Z7);
            put("壬戌", Z7);
            put("癸亥", Z7);
        }};
        LinkedHashMap<String, String> jinshen = new LinkedHashMap<String, String>() {{
            put("乙丑", Z11);
            put("己巳", Z11);
            put("癸酉", Z11);
        }};
        LinkedHashMap<String, String> ciguan = new LinkedHashMap<String, String>() {{
            put("甲庚寅", Z15);
            put("乙辛卯", Z15);
            put("丙乙巳", Z15);
            put("丁戊午", Z15);
            put("戊丁巳", Z15);
            put("己庚午", Z15);
            put("庚壬申", Z15);
            put("辛癸酉", Z15);
            put("壬癸亥", Z15);
            put("癸壬戌", Z15);
        }};
        LinkedHashMap<String, String> tiandeguiren = new LinkedHashMap<String, String>() {{
            put("寅丁", Z16);
            put("辰壬", Z16);
            put("巳辛", Z16);
            put("未甲", Z16);
            put("申癸", Z16);
            put("戌丙", Z16);
            put("亥乙", Z16);
            put("丑庚", Z16);
            put("巳子", Z16);
            put("寅酉", Z16);
            put("亥午", Z16);
            put("申卯", Z16);
        }};
        LinkedHashMap<String, String> yuedeguiren = new LinkedHashMap<String, String>() {{
            put("辰壬", Z17);
            put("未甲", Z17);
            put("戌丙", Z17);
            put("丑庚", Z17);
            put("寅丙", Z17);
            put("午丙", Z17);
            put("申壬", Z17);
            put("子壬", Z17);
            put("亥甲", Z17);
            put("卯甲", Z17);
            put("巳庚", Z17);
            put("酉庚", Z17);
        }};
        LinkedHashMap<String, String> jiangxing = new LinkedHashMap<String, String>() {{
            put("午寅", Z18);
            put("子子", Z18);
            put("子辰", Z18);
            put("酉丑", Z18);
            put("酉巳", Z18);
            put("卯卯", Z18);
            put("卯未", Z18);
            put("子申", Z18);
            put("卯亥", Z18);
            put("午午", Z18);
            put("酉酉", Z18);
            put("午戌", Z18);
        }};
        LinkedHashMap<String, String> sangmen = new LinkedHashMap<String, String>() {{
            put("子寅", Z19);
            put("戌子", Z19);
            put("丑卯", Z19);
            put("卯巳", Z19);
            put("辰午", Z19);
            put("午申", Z19);
            put("未酉", Z19);
            put("酉亥", Z19);
            put("申戌", Z19);
            put("巳未", Z19);
            put("寅辰", Z19);
            put("亥丑", Z19);
        }};
        LinkedHashMap<String, String> liuer = new LinkedHashMap<String, String>() {{
            put("酉戌", Z20);
            put("午亥", Z20);
            put("子酉", Z20);
            put("酉午", Z20);
            put("午未", Z20);
            put("卯申", Z20);
            put("午卯", Z20);
            put("卯辰", Z20);
            put("子巳", Z20);
            put("酉寅", Z20);
            put("卯子", Z20);
            put("子丑", Z20);
        }};
        LinkedHashMap<String, String> bingfu = new LinkedHashMap<String, String>() {{
            put("戌亥", Z21);
            put("酉戌", Z21);
            put("未申", Z21);
            put("申酉", Z21);
            put("巳午", Z21);
            put("午未", Z21);
            put("卯辰", Z21);
            put("辰巳", Z21);
            put("亥子", Z21);
            put("寅卯", Z21);
            put("子丑", Z21);
            put("丑寅", Z21);
        }};
        LinkedHashMap<String, String> zaisha = new LinkedHashMap<String, String>() {{
            put("酉亥", Z22);
            put("卯酉", Z22);
            put("子戌", Z22);
            put("酉未", Z22);
            put("午申", Z22);
            put("子午", Z22);
            put("酉卯", Z22);
            put("午辰", Z22);
            put("卯巳", Z22);
            put("午子", Z22);
            put("卯丑", Z22);
            put("子寅", Z22);
        }};
        LinkedHashMap<String, String> huagai = new LinkedHashMap<String, String>() {{
            put("戌戌", Z23);
            put("未亥", Z23);
            put("丑酉", Z23);
            put("戌午", Z23);
            put("未未", Z23);
            put("辰申", Z23);
            put("未卯", Z23);
            put("辰辰", Z23);
            put("丑巳", Z23);
            put("戌寅", Z23);
            put("辰子", Z23);
            put("丑丑", Z23);
        }};
        LinkedHashMap<String, String> jiesha = new LinkedHashMap<String, String>() {{
            put("亥戌", Z25);
            put("申亥", Z25);
            put("寅酉", Z25);
            put("亥午", Z25);
            put("申未", Z25);
            put("巳申", Z25);
            put("申卯", Z25);
            put("巳辰", Z25);
            put("寅巳", Z25);
            put("亥寅", Z25);
            put("巳子", Z25);
            put("寅丑", Z25);
        }};
        LinkedHashMap<String, String> hongluan = new LinkedHashMap<String, String>() {{
            put("午酉", Z26);
            put("巳戌", Z26);
            put("辰亥", Z26);
            put("酉午", Z26);
            put("申未", Z26);
            put("未申", Z26);
            put("戌巳", Z26);
            put("亥辰", Z26);
            put("卯子", Z26);
            put("子卯", Z26);
            put("丑寅", Z26);
            put("寅丑", Z26);
        }};
        LinkedHashMap<String, String> xianchi = new LinkedHashMap<String, String>() {{
            put("午酉", Z27);
            put("卯戌", Z27);
            put("子亥", Z27);
            put("酉申", Z27);
            put("卯午", Z27);
            put("子未", Z27);
            put("酉辰", Z27);
            put("午巳", Z27);
            put("子卯", Z27);
            put("酉子", Z27);
            put("午丑", Z27);
            put("卯寅", Z27);
        }};
        LinkedHashMap<String, String> guasu = new LinkedHashMap<String, String>() {{
            put("戌亥", Z28);
            put("未酉", Z28);
            put("未戌", Z28);
            put("未申", Z28);
            put("辰午", Z28);
            put("辰未", Z28);
            put("辰巳", Z28);
            put("戌子", Z28);
            put("戌丑", Z28);
            put("丑卯", Z28);
            put("丑辰", Z28);
            put("丑寅", Z28);
        }};
        LinkedHashMap<String, String> diaoke = new LinkedHashMap<String, String>() {{
            put("亥酉", Z29);
            put("丑亥", Z29);
            put("子戌", Z29);
            put("戌申", Z29);
            put("酉未", Z29);
            put("申午", Z29);
            put("未巳", Z29);
            put("午辰", Z29);
            put("巳卯", Z29);
            put("辰寅", Z29);
            put("卯丑", Z29);
            put("寅子", Z29);
        }};
        LinkedHashMap<String, String> guchen = new LinkedHashMap<String, String>() {{
            put("亥酉", Z30);
            put("亥戌", Z30);
            put("寅亥", Z30);
            put("申午", Z30);
            put("申未", Z30);
            put("亥申", Z30);
            put("巳卯", Z30);
            put("巳辰", Z30);
            put("申巳", Z30);
            put("寅丑", Z30);
            put("巳寅", Z30);
            put("寅子", Z30);
        }};
        LinkedHashMap<String, String> tianxi = new LinkedHashMap<String, String>() {{
            put("亥戌", Z31);
            put("戌亥", Z31);
            put("子酉", Z31);
            put("卯午", Z31);
            put("巳辰", Z31);
            put("午卯", Z31);
            put("丑申", Z31);
            put("寅未", Z31);
            put("辰巳", Z31);
            put("酉子", Z31);
            put("未寅", Z31);
            put("申丑", Z31);
        }};
        LinkedHashMap<String, String> yima = new LinkedHashMap<String, String>() {{
            put("申戌", Z32);
            put("亥酉", Z32);
            put("巳亥", Z32);
            put("寅申", Z32);
            put("巳未", Z32);
            put("申午", Z32);
            put("亥巳", Z32);
            put("寅辰", Z32);
            put("巳卯", Z32);
            put("亥丑", Z32);
            put("申寅", Z32);
            put("寅子", Z32);
        }};
        LinkedHashMap<String, String> wangshen = new LinkedHashMap<String, String>() {{
            put("巳寅", Z33);
            put("申丑", Z33);
            put("亥子", Z33);
            put("寅卯", Z33);
            put("申巳", Z33);
            put("亥辰", Z33);
            put("寅未", Z33);
            put("巳午", Z33);
            put("亥申", Z33);
            put("寅亥", Z33);
            put("巳戌", Z33);
            put("申酉", Z33);
        }};
        LinkedHashMap<String, String> pima = new LinkedHashMap<String, String>() {{
            put("寅亥", Z34);
            put("亥申", Z34);
            put("子酉", Z34);
            put("丑戌", Z34);
            put("戌未", Z34);
            put("酉午", Z34);
            put("申巳", Z34);
            put("未辰", Z34);
            put("午卯", Z34);
            put("巳寅", Z34);
            put("辰丑", Z34);
            put("卯子", Z34);
        }};
        LinkedHashMap<String, String> tianyi = new LinkedHashMap<String, String>() {{
            put("子丑", Z35);
            put("丑寅", Z35);
            put("寅卯", Z35);
            put("卯辰", Z35);
            put("辰巳", Z35);
            put("巳午", Z35);
            put("午未", Z35);
            put("未申", Z35);
            put("申酉", Z35);
            put("酉戌", Z35);
            put("戌亥", Z35);
            put("亥子", Z35);
        }};
        LinkedHashMap<String, String> sifu = new LinkedHashMap<String, String>() {{
            put("辰亥", Z37);
            put("卯戌", Z37);
            put("寅酉", Z37);
            put("亥午", Z37);
            put("丑申", Z37);
            put("子未", Z37);
            put("戌巳", Z37);
            put("酉辰", Z37);
            put("申卯", Z37);
            put("未寅", Z37);
            put("午丑", Z37);
            put("巳子", Z37);
        }};
        LinkedHashMap<String, String> xuetang = new LinkedHashMap<String, String>() {{
            put("木亥", Z41);
            put("火寅", Z41);
            put("土甲", Z41);
            put("金巳", Z41);
            put("水申", Z41);
        }};
        LinkedHashMap<String, String> fuxingguiren = new LinkedHashMap<String, String>() {{
            put("子甲", Z44);
            put("子丙", Z44);
            put("丑乙", Z44);
            put("寅甲", Z44);
            put("寅丙", Z44);
            put("卯乙", Z44);
            put("申戊", Z44);
            put("亥丁", Z44);
            put("丑癸", Z44);
            put("卯癸", Z44);
            put("辰壬", Z44);
            put("巳辛", Z44);
            put("午庚", Z44);
            put("未己", Z44);
        }};
        LinkedHashMap<String, String> taijiguiren = new LinkedHashMap<String, String>() {{
            put("亥庚", Z45);
            put("亥辛", Z45);
            put("戌己", Z45);
            put("未己", Z45);
            put("申壬", Z45);
            put("申癸", Z45);
            put("辰己", Z45);
            put("巳壬", Z45);
            put("巳癸", Z45);
            put("寅庚", Z45);
            put("寅辛", Z45);
            put("丑己", Z45);
            put("酉丙", Z45);
            put("酉丁", Z45);
            put("戌戊", Z45);
            put("未戊", Z45);
            put("未甲", Z45);
            put("午乙", Z45);
            put("辰戊", Z45);
            put("丑戊", Z45);
            put("卯丙", Z45);
            put("卯丁", Z45);
            put("子甲", Z45);
            put("子乙", Z45);
        }};
        LinkedHashMap<String, String> tianchuguiren = new LinkedHashMap<String, String>() {{
            put("子丙", Z46);
            put("巳甲", Z46);
            put("巳丁", Z46);
            put("午乙", Z46);
            put("午戊", Z46);
            put("寅庚", Z46);
            put("午辛", Z46);
            put("申己", Z46);
            put("酉壬", Z46);
            put("亥癸", Z46);
        }};
        LinkedHashMap<String, String> wenchangguiren = new LinkedHashMap<String, String>() {{
            put("巳甲", Z47);
            put("巳乙", Z47);
            put("午甲", Z47);
            put("午乙", Z47);
            put("申丙", Z47);
            put("申戊", Z47);
            put("酉丁", Z47);
            put("子辛", Z47);
            put("寅壬", Z47);
            put("卯癸", Z47);
            put("酉己", Z47);
            put("亥庚", Z47);
        }};
        LinkedHashMap<String, String> guoyinguiren = new LinkedHashMap<String, String>() {{
            put("丑丙", Z48);
            put("丑戊", Z48);
            put("寅丁", Z48);
            put("戌甲", Z48);
            put("亥乙", Z48);
            put("寅己", Z48);
            put("辰庚", Z48);
            put("巳辛", Z48);
            put("未壬", Z48);
            put("申癸", Z48);
        }};
        LinkedHashMap<String, String> tianguanguiren = new LinkedHashMap<String, String>() {{
            put("辰乙", Z49);
            put("巳丙", Z49);
            put("未甲", Z49);
            put("酉丁", Z49);
            put("戌戊", Z49);
            put("丑庚", Z49);
            put("寅壬", Z49);
            put("卯己", Z49);
            put("午癸", Z49);
            put("申辛", Z49);
        }};
        LinkedHashMap<String, String> hongyan = new LinkedHashMap<String, String>() {{
            put("寅丙", Z50);
            put("辰戊", Z50);
            put("午甲", Z50);
            put("未丁", Z50);
            put("申乙", Z50);
            put("子壬", Z50);
            put("辰己", Z50);
            put("申庚", Z50);
            put("酉辛", Z50);
            put("戌癸", Z50);
        }};
        LinkedHashMap<String, String> jinyu = new LinkedHashMap<String, String>() {{
            put("亥辛", Z51);
            put("戌庚", Z51);
            put("申己", Z51);
            put("寅癸", Z51);
            put("丑壬", Z51);
            put("申丁", Z51);
            put("未戊", Z51);
            put("未丙", Z51);
            put("巳乙", Z51);
            put("辰甲", Z51);
        }};
        LinkedHashMap<String, String> tianyiguiren = new LinkedHashMap<String, String>() {{
            put("申己", Z53);
            put("午庚", Z53);
            put("午辛", Z53);
            put("巳壬", Z53);
            put("巳癸", Z53);
            put("卯壬", Z53);
            put("卯癸", Z53);
            put("寅庚", Z53);
            put("寅辛", Z53);
            put("酉丙", Z53);
            put("酉丁", Z53);
            put("亥丙", Z53);
            put("亥丁", Z53);
            put("子己", Z53);
            put("未甲", Z53);
            put("未戊", Z53);
            put("申乙", Z53);
            put("丑戊", Z53);
            put("丑甲", Z53);
            put("子乙", Z53);
        }};
        LinkedHashMap<String, String> yangren = new LinkedHashMap<String, String>() {{
            put("亥癸", Z55);
            put("酉庚", Z55);
            put("申辛", Z55);
            put("巳己", Z55);
            put("子壬", Z55);
            put("午戊", Z55);
            put("午丙", Z55);
            put("巳丁", Z55);
            put("卯甲", Z55);
            put("寅乙", Z55);
        }};
        LinkedHashMap<String, String> lushen = new LinkedHashMap<String, String>() {{
            put("亥壬", Z56);
            put("酉辛", Z56);
            put("申庚", Z56);
            put("午己", Z56);
            put("子癸", Z56);
            put("午丁", Z56);
            put("巳丙", Z56);
            put("巳戊", Z56);
            put("卯乙", Z56);
            put("寅甲", Z56);
        }};
        LinkedHashMap<String, String> rideguiren = new LinkedHashMap<String, String>() {{
            put("寅甲", Z60);
            put("辰丙", Z60);
            put("辰戊", Z60);
            put("辰庚", Z60);
            put("戌壬", Z60);
        }};
        LinkedHashMap<String, String> tongziming = new LinkedHashMap<String, String>() {{
            put("寅寅", Z61);
            put("卯寅", Z61);
            put("辰寅", Z61);
            put("申寅", Z61);
            put("酉寅", Z61);
            put("戌寅", Z61);
            put("寅子", Z61);
            put("卯子", Z61);
            put("辰子", Z61);
            put("申子", Z61);
            put("酉子", Z61);
            put("戌子", Z61);
            put("巳卯", Z61);
            put("午卯", Z61);
            put("未卯", Z61);
            put("亥卯", Z61);
            put("子卯", Z61);
            put("丑卯", Z61);
            put("巳未", Z61);
            put("午未", Z61);
            put("未未", Z61);
            put("亥未", Z61);
            put("子未", Z61);
            put("丑未", Z61);
            put("巳辰", Z61);
            put("午辰", Z61);
            put("未辰", Z61);
            put("亥辰", Z61);
            put("子辰", Z61);
            put("丑辰", Z61);
            put("金午", Z61);
            put("金卯", Z61);
            put("木午", Z61);
            put("木卯", Z61);
            put("火酉", Z61);
            put("水戌", Z61);
            put("水酉", Z61);
            put("火戌", Z61);
            put("土辰", Z61);
            put("土巳", Z61);
        }};
        LinkedHashMap<String, String> tiandehe = new LinkedHashMap<String, String>() {{
            put("寅壬", Z96);
            put("卯巳", Z96);
            put("辰丁", Z96);
            put("巳丙", Z96);
            put("午寅", Z96);
            put("未己", Z96);
            put("申戊", Z96);
            put("酉亥", Z96);
            put("戌辛", Z96);
            put("亥庚", Z96);
            put("子申", Z96);
            put("丑乙", Z96);
        }};
        LinkedHashMap<String, String> sanqiguiren = new LinkedHashMap<String, String>() {{
            put("甲戊庚", Z109);
            put("乙丙丁", Z109);
            put("壬癸辛", Z109);
        }};
        LinkedHashMap<String, String> guanyunguiren = new LinkedHashMap<String, String>() {{
            put("庚乙", Z113);
            put("辛丙", Z113);
            put("壬丁", Z113);
            put("癸戊", Z113);
            put("甲己", Z113);
            put("乙庚", Z113);
            put("庚丙", Z113);
            put("辛丁", Z113);
            put("壬戊", Z113);
            put("癸己", Z113);
            put("甲庚", Z113);
            put("乙辛", Z113);
        }};
        LinkedHashMap<String, String> gojiaosha = new LinkedHashMap<>();
        LinkedHashMap<String, String> guluanguaquesha= new LinkedHashMap<>();
        LinkedHashMap<String, String> yuanchen = new LinkedHashMap<>();
        switch (sex) {
            case 0:
                guluanguaquesha = new LinkedHashMap<String, String>() {{
                    put("丁巳", Z140);
                    put("甲寅", Z140);
                    put("丙午", Z140);
                    put("壬子", Z140);
                }};
                if (SX.get(nz).get(1).equals("1")) {
                    gojiaosha = new LinkedHashMap<String, String>() {{
                        put("寅亥", Z142);
                        put("丑戌", Z142);
                        put("戌未", Z142);
                        put("亥申", Z142);
                        put("子酉", Z142);
                        put("酉午", Z142);
                        put("未辰", Z142);
                        put("申巳", Z142);
                        put("巳寅", Z142);
                        put("午卯", Z142);
                        put("卯子", Z142);
                        put("辰丑", Z142);
                        put("申亥", Z141);
                        put("未戌", Z141);
                        put("午酉", Z141);
                        put("巳申", Z141);
                        put("辰未", Z141);
                        put("卯午", Z141);
                        put("寅巳", Z141);
                        put("丑辰", Z141);
                        put("亥寅", Z141);
                        put("子卯", Z141);
                        put("戌丑", Z141);
                        put("酉子", Z141);
                    }};
                    yuanchen = new LinkedHashMap<String, String>() {{
                        put("午亥", Z143);
                        put("巳戌", Z143);
                        put("辰酉", Z143);
                        put("卯申", Z143);
                        put("寅未", Z143);
                        put("丑午", Z143);
                        put("亥辰", Z143);
                        put("戌卯", Z143);
                        put("酉寅", Z143);
                        put("子巳", Z143);
                        put("未子", Z143);
                        put("申丑", Z143);
                    }};
                }
                if (SX.get(nz).get(1).equals("0")) {
                    gojiaosha = new LinkedHashMap<String, String>() {{
                        put("寅亥", Z141);
                        put("丑戌", Z141);
                        put("戌未", Z141);
                        put("亥申", Z141);
                        put("子酉", Z141);
                        put("酉午", Z141);
                        put("未辰", Z141);
                        put("申巳", Z141);
                        put("巳寅", Z141);
                        put("午卯", Z141);
                        put("卯子", Z141);
                        put("辰丑", Z141);
                        put("申亥", Z142);
                        put("未戌", Z142);
                        put("午酉", Z142);
                        put("巳申", Z142);
                        put("辰未", Z142);
                        put("卯午", Z142);
                        put("寅巳", Z142);
                        put("丑辰", Z142);
                        put("亥寅", Z142);
                        put("子卯", Z142);
                        put("戌丑", Z142);
                        put("酉子", Z142);
                    }};
                    yuanchen = new LinkedHashMap<String, String>() {{
                        put("辰亥", Z143);
                        put("卯戌", Z143);
                        put("寅酉", Z143);
                        put("亥午", Z143);
                        put("丑申", Z143);
                        put("子未", Z143);
                        put("戌巳", Z143);
                        put("酉辰", Z143);
                        put("申卯", Z143);
                        put("未寅", Z143);
                        put("巳子", Z143);
                        put("午丑", Z143);
                    }};
                }
                break;
            case 1:
                guluanguaquesha = new LinkedHashMap<String, String>() {{
                    put("乙巳", Z140);
                    put("辛亥", Z140);
                    put("甲午", Z140);
                    put("戊申", Z140);
                }};
                if (SX.get(nz).get(1).equals("0")) {
                    gojiaosha = new LinkedHashMap<String, String>() {{
                        put("寅亥", Z142);
                        put("丑戌", Z142);
                        put("戌未", Z142);
                        put("亥申", Z142);
                        put("子酉", Z142);
                        put("酉午", Z142);
                        put("未辰", Z142);
                        put("申巳", Z142);
                        put("巳寅", Z142);
                        put("午卯", Z142);
                        put("卯子", Z142);
                        put("辰丑", Z142);
                        put("申亥", Z141);
                        put("未戌", Z141);
                        put("午酉", Z141);
                        put("巳申", Z141);
                        put("辰未", Z141);
                        put("卯午", Z141);
                        put("寅巳", Z141);
                        put("丑辰", Z141);
                        put("亥寅", Z141);
                        put("子卯", Z141);
                        put("戌丑", Z141);
                        put("酉子", Z141);
                    }};
                    yuanchen = new LinkedHashMap<String, String>() {{
                        put("午亥", Z143);
                        put("巳戌", Z143);
                        put("辰酉", Z143);
                        put("卯申", Z143);
                        put("寅未", Z143);
                        put("丑午", Z143);
                        put("亥辰", Z143);
                        put("戌卯", Z143);
                        put("酉寅", Z143);
                        put("子巳", Z143);
                        put("未子", Z143);
                        put("申丑", Z143);
                    }};
                }
                if (SX.get(nz).get(1).equals("1")) {
                    gojiaosha = new LinkedHashMap<String, String>() {{
                        put("寅亥", Z141);
                        put("丑戌", Z141);
                        put("戌未", Z141);
                        put("亥申", Z141);
                        put("子酉", Z141);
                        put("酉午", Z141);
                        put("未辰", Z141);
                        put("申巳", Z141);
                        put("巳寅", Z141);
                        put("午卯", Z141);
                        put("卯子", Z141);
                        put("辰丑", Z141);
                        put("申亥", Z142);
                        put("未戌", Z142);
                        put("午酉", Z142);
                        put("巳申", Z142);
                        put("辰未", Z142);
                        put("卯午", Z142);
                        put("寅巳", Z142);
                        put("丑辰", Z142);
                        put("亥寅", Z142);
                        put("子卯", Z142);
                        put("戌丑", Z142);
                        put("酉子", Z142);
                    }};
                    yuanchen = new LinkedHashMap<String, String>() {{
                        put("辰亥", Z143);
                        put("卯戌", Z143);
                        put("寅酉", Z143);
                        put("亥午", Z143);
                        put("丑申", Z143);
                        put("子未", Z143);
                        put("戌巳", Z143);
                        put("酉辰", Z143);
                        put("申卯", Z143);
                        put("未寅", Z143);
                        put("巳子", Z143);
                        put("午丑", Z143);
                    }};
                }
                break;
        }
        String NZ4 = "", YZ2 = "", SZ1 = "", RZ2 = "", RZ3 = "", RZ4 = "", RZ5 = "", RZ6 = "";
        String SZ11 = "";
        String orignStr = NY.get(rg + rz).get(2) + (NY.get(rg + rz).get(3));
        if (orignStr.contains(nz)) {
            NZ4 = Z149;
        }
        if (orignStr.contains(yz)) {
            YZ2 = Z149;
        }
        if (orignStr.contains(sz)) {
            SZ1 = Z149;
        }
        if (Arrays.asList("甲辰", "乙亥", "丙辰", "丁酉", "戊午", "庚戌", "庚寅", "辛亥", "壬寅", "癸未").contains(rg + rz)) {
            RZ2 = Z155;
        }
        if (Arrays.asList("甲辰", "乙巳", "壬申", "丙申", "丁亥", "庚辰", "戊戌", "癸亥", "辛巳", "己丑").contains(rg + rz)) {
            RZ3 = Z156;
        }
        if (Arrays.asList("寅庚申", "寅辛酉", "卯庚申", "卯辛酉", "辰庚申", "辰辛酉", "巳壬子", "巳癸亥", "午壬子", "午癸亥", "未壬子", "未癸亥", "申甲寅", "申乙卯", "酉甲寅", "酉乙卯", "戌甲寅", "戌乙卯", "亥丙午", "亥丁巳", "子丙午", "子丁巳", "丑丙午", "丑丁巳").contains(yz + rg + rz)) {
            RZ5 = Z157;
        }
        if (Arrays.asList("甲午", "甲申", "丙寅", "丁未", "戊辰", "庚戌", "辛酉", "壬子").contains(rg + rz)) {
            RZ4 = Z158;
        }
        if (sex == 1 && Arrays.asList("庚午巳", "辛未巳", "丙子巳", "丁丑巳", "戊寅巳", "己卯巳", "甲申巳", "乙酉巳", "丙戌巳", "丁亥巳", "壬辰巳", "癸巳巳", "庚子巳", "辛丑巳", "丙午巳", "丁未巳", "戊申巳", "己酉巳", "甲寅巳", "乙卯巳", "丙辰巳", "丁巳巳", "壬戌巳", "癸亥巳", "庚午辰", "辛未辰", "丙子辰", "丁丑辰", "戊寅辰", "己卯辰", "甲申辰", "乙酉辰", "丙戌辰", "丁亥辰", "壬辰辰", "癸巳辰", "庚子辰", "辛丑辰", "丙午辰", "丁未辰", "戊申辰", "己酉辰", "甲寅辰", "乙卯辰", "丙辰辰", "丁巳辰", "壬戌辰", "癸亥辰").contains(ng + nz + rz)) {
            RZ6 = Z159;
        }
        if (sex == 0 && Arrays.asList("戊午戌", "己未戌", "甲辰戌", "乙巳戌", "丙申戌", "丁酉戌", "戊子戌", "己丑戌", "甲戌戌", "乙亥戌", "丙寅戌", "丁卯戌", "戊午亥", "己未亥", "甲辰亥", "乙巳亥", "丙申亥", "丁酉亥", "戊子亥", "己丑亥", "甲戌亥", "乙亥亥", "丙寅亥", "丁卯亥").contains(ng + nz + rz)) {
            RZ6 = Z159;
        }
        LinkedHashMap<String, String> duanqiaoguan = new LinkedHashMap<String, String>() {
            {
                put("寅寅", Z14);
                put("卯卯", Z14);
                put("辰申", Z14);
                put("巳丑", Z14);
                put("午戌", Z14);
                put("未酉", Z14);
                put("申辰", Z14);
                put("酉巳", Z14);
                put("戌午", Z14);
                put("亥未", Z14);
                put("子亥", Z14);
                put("丑子", Z14);
            }
        };
        LinkedHashMap<String, String> niangniangguan = new LinkedHashMap<String, String>() {{
            put("寅丑", Z38);
            put("卯丑", Z38);
            put("辰丑", Z38);
            put("巳寅", Z38);
            put("午寅", Z38);
            put("未寅", Z38);
            put("申卯", Z38);
            put("酉卯", Z38);
            put("戌卯", Z38);
            put("亥戌", Z38);
            put("子戌", Z38);
            put("丑戌", Z38);
            put("寅未", Z38);
            put("卯未", Z38);
            put("辰未", Z38);
            put("巳申", Z38);
            put("午申", Z38);
            put("未申", Z38);
            put("申酉", Z38);
            put("酉酉", Z38);
            put("戌酉", Z38);
            put("亥辰", Z38);
            put("子辰", Z38);
            put("丑辰", Z38);
        }};
        LinkedHashMap<String, String> duanmingguan = new LinkedHashMap<String, String>() {{
            put("子巳", Z39);
            put("申巳", Z39);
            put("辰巳", Z39);
            put("巳寅", Z39);
            put("丑寅", Z39);
            put("酉寅", Z39);
            put("寅辰", Z39);
            put("午辰", Z39);
            put("戌辰", Z39);
            put("亥未", Z39);
            put("卯未", Z39);
            put("未未", Z39);
        }};
        LinkedHashMap<String, String> duanchangguan = new LinkedHashMap<String, String>() {{
            put("甲午", Z66);
            put("乙午", Z66);
            put("甲未", Z66);
            put("乙未", Z66);
            put("丙辰", Z66);
            put("丁辰", Z66);
            put("丙巳", Z66);
            put("丁巳", Z66);
            put("戊午", Z66);
            put("己未", Z66);
            put("庚寅", Z66);
            put("辛寅", Z66);
            put("壬丑", Z66);
            put("癸丑", Z66);
        }};
        LinkedHashMap<String, String> zhuangmingguan = new LinkedHashMap<String, String>() {{
            put("寅子", Z72);
            put("卯巳", Z72);
            put("辰辰", Z72);
            put("巳午", Z72);
            put("午午", Z72);
            put("未丑", Z72);
            put("申午", Z72);
            put("酉酉", Z72);
            put("戌未", Z72);
            put("亥亥", Z72);
            put("子丑", Z72);
            put("丑未", Z72);
        }};
        LinkedHashMap<String, String> tanghuoguan = new LinkedHashMap<String, String>() {
            {
                put("子午", Z77);
                put("午午", Z77);
                put("卯午", Z77);
                put("酉午", Z77);
                put("寅寅", Z77);
                put("巳寅", Z77);
                put("申寅", Z77);
                put("亥寅", Z77);
                put("辰未", Z77);
                put("戌未", Z77);
                put("未未", Z77);
                put("丑未", Z77);
            }
        };
        LinkedHashMap<String, String> xuanliangguan = new LinkedHashMap<String, String>() {
            {
                put("乙酉", Z80);
                put("癸未", Z80);
                put("丁卯", Z80);
                put("己酉", Z80);
                put("丙申", Z80);
                put("丁酉", Z80);
                put("戊戌", Z80);
                put("癸亥", Z80);
            }
        };
        LinkedHashMap<String, String> leigongguan = new LinkedHashMap<String, String>() {{
            put("甲丑", Z82);
            put("乙午", Z82);
            put("丙子", Z82);
            put("丁子", Z82);
            put("戊戌", Z82);
            put("己戌", Z82);
            put("庚寅", Z82);
            put("辛寅", Z82);
            put("壬酉", Z82);
            put("癸亥", Z82);
        }};
        LinkedHashMap<String, String> tiandiaoguan = new LinkedHashMap<String, String>() {{
            put("申巳", Z83);
            put("子巳", Z83);
            put("辰巳", Z83);
            put("寅辰", Z83);
            put("午辰", Z83);
            put("戌辰", Z83);
            put("亥申", Z83);
            put("卯申", Z83);
            put("未申", Z83);
            put("巳卯", Z83);
            put("酉卯", Z83);
            put("丑卯", Z83);
            put("申申", Z83);
            put("子申", Z83);
            put("辰申", Z83);
            put("寅酉", Z83);
            put("午酉", Z83);
            put("戌酉", Z83);
            put("亥午", Z83);
            put("卯午", Z83);
            put("未午", Z83);
            put("巳子", Z83);
            put("酉子", Z83);
            put("丑子", Z83);
        }};
        LinkedHashMap<String, String> sijiguan = new LinkedHashMap<String, String>() {{
            put("寅壬辰", Z84);
            put("卯壬辰", Z84);
            put("辰壬辰", Z84);
        }};
        LinkedHashMap<String, String> qianriguan = new LinkedHashMap<String, String>() {{
            put("甲午", Z85);
            put("乙午", Z85);
            put("甲辰", Z85);
            put("乙辰", Z85);
            put("丙申", Z85);
            put("丁申", Z85);
            put("庚寅", Z85);
            put("辛寅", Z85);
            put("戊巳", Z85);
            put("己巳", Z85);
            put("壬丑", Z85);
            put("癸丑", Z85);
            put("壬亥", Z85);
            put("癸亥", Z85);
        }};
        LinkedHashMap<String, String> tulaoguan = new LinkedHashMap<String, String>() {{
            put("戊寅", Z89);
            put("戊申", Z89);
            put("癸巳", Z89);
            put("癸亥", Z89);
            put("壬寅", Z89);
            put("壬午", Z89);
            put("庚午", Z89);
            put("甲寅", Z89);
            put("乙卯", Z89);
            put("己卯", Z89);
        }};
        LinkedHashMap<String, String> sizhuguan = new LinkedHashMap<String, String>() {{
            put("寅巳", Z91);
            put("申巳", Z91);
            put("卯辰", Z91);
            put("酉辰", Z91);
            put("辰卯", Z91);
            put("戌卯", Z91);
            put("巳寅", Z91);
            put("亥寅", Z91);
            put("午丑", Z91);
            put("子丑", Z91);
            put("未子", Z91);
            put("丑子", Z91);
            put("寅亥", Z91);
            put("申亥", Z91);
            put("卯戌", Z91);
            put("酉戌", Z91);
            put("辰酉", Z91);
            put("戌酉", Z91);
            put("巳申", Z91);
            put("亥申", Z91);
            put("午未", Z91);
            put("子未", Z91);
            put("未午", Z91);
            put("丑午", Z91);
        }};
        LinkedHashMap<String, String> jijiaoguan = new LinkedHashMap<String, String>() {{
            put("寅亥", Z93);
            put("卯亥", Z93);
            put("辰亥", Z93);
            put("巳卯", Z93);
            put("午卯", Z93);
            put("未卯", Z93);
            put("申寅", Z93);
            put("酉寅", Z93);
            put("戌寅", Z93);
            put("亥丑", Z93);
            put("子丑", Z93);
            put("丑丑", Z93);
            put("寅子", Z93);
            put("卯子", Z93);
            put("辰子", Z93);
            put("巳未", Z93);
            put("午未", Z93);
            put("未未", Z93);
            put("申戌", Z93);
            put("酉戌", Z93);
            put("戌戌", Z93);
            put("亥辰", Z93);
            put("子辰", Z93);
            put("丑辰", Z93);
        }};
        LinkedHashMap<String, String> jinsuoguan = new LinkedHashMap<String, String>() {{
            put("寅申", Z94);
            put("卯酉", Z94);
            put("辰戌", Z94);
            put("巳亥", Z94);
            put("午子", Z94);
            put("未丑", Z94);
            put("申申", Z94);
            put("酉酉", Z94);
            put("戌戌", Z94);
            put("亥亥", Z94);
            put("子子", Z94);
            put("丑丑", Z94);
        }};
        LinkedHashMap<String, String> luojingguan = new LinkedHashMap<String, String>() {{
            put("甲巳", Z98);
            put("己巳", Z98);
            put("乙子", Z98);
            put("壬子", Z98);
            put("丙申", Z98);
            put("辛申", Z98);
            put("丁戌", Z98);
            put("壬戌", Z98);
            put("戊卯", Z98);
            put("癸卯", Z98);
        }};
        LinkedHashMap<String, String> wuguiguan = new LinkedHashMap<String, String>() {{
            put("子辰", Z104);
            put("丑卯", Z104);
            put("寅寅", Z104);
            put("卯丑", Z104);
            put("辰子", Z104);
            put("巳亥", Z104);
            put("午戌", Z104);
            put("未酉", Z104);
            put("申申", Z104);
            put("酉未", Z104);
            put("戌午", Z104);
            put("亥巳", Z104);
        }};
        LinkedHashMap<String, String> tiesuoguan = new LinkedHashMap<String, String>() {{
            put("寅寅", Z108);
            put("卯寅", Z108);
            put("辰寅", Z108);
            put("巳巳", Z108);
            put("午巳", Z108);
            put("未巳", Z108);
            put("申丑", Z108);
            put("酉丑", Z108);
            put("戌丑", Z108);
            put("亥戌", Z108);
            put("子戌", Z108);
            put("丑戌", Z108);
        }};
        LinkedHashMap<String, String> xueguangguan = new LinkedHashMap<String, String>() {{
            put("子午", Z127);
            put("丑子", Z127);
            put("寅丑", Z127);
            put("卯未", Z127);
            put("辰寅", Z127);
            put("巳申", Z127);
            put("午卯", Z127);
            put("未酉", Z127);
            put("申辰", Z127);
            put("酉戌", Z127);
            put("戌巳", Z127);
            put("亥亥", Z127);
        }};
        LinkedHashMap<String, String> yanluoguan = new LinkedHashMap<>();
        switch (sex) {
            case 1:
                yanluoguan = new LinkedHashMap<String, String>() {{
                    put("寅丑", Z132);
                    put("卯丑", Z132);
                    put("辰丑", Z132);
                    put("巳辰", Z132);
                    put("午辰", Z132);
                    put("未辰", Z132);
                    put("申子", Z132);
                    put("酉子", Z132);
                    put("戌子", Z132);
                    put("亥寅", Z132);
                    put("子寅", Z132);
                    put("丑寅", Z132);
                    put("寅未", Z132);
                    put("卯未", Z132);
                    put("辰未", Z132);
                    put("巳戌", Z132);
                    put("午戌", Z132);
                    put("未戌", Z132);
                    put("申午", Z132);
                    put("酉午", Z132);
                    put("戌午", Z132);
                    put("亥卯", Z132);
                    put("子卯", Z132);
                    put("丑卯", Z132);
                }};
                if ("金".contains(NYWX) && "戌".contains(sz)) SZ11 = Z223;
                if ("火".contains(NYWX) && "未申".contains(sz)) SZ11 = Z223;
                if ("木".contains(NYWX) && "辰".contains(sz)) SZ11 = Z223;
                if ("水土".contains(NYWX) && "丑寅".contains(sz)) SZ11 = Z223;
                if ("庚辛".contains(rg) && "戌".contains(sz)) SZ11 = Z223;
                if ("甲乙".contains(rg) && "辰".contains(sz)) SZ11 = Z223;
                if ("丙丁".contains(rg) && "未申".contains(sz)) SZ11 = Z223;
                if ("戊己壬癸".contains(rg) && "丑寅".contains(sz)) SZ11 = Z223;
                break;
        }
        String SZ7 = "", SZ6 = "";
        if ("子午卯酉".contains(yz) && "寅申巳亥".contains(sz)) SZ7 = Z145;
        if ("寅申巳亥".contains(yz) && "辰戌丑未".contains(sz)) SZ7 = Z145;
        if ("辰戌丑未".contains(yz) && "子午卯酉".contains(sz)) SZ7 = Z145;
        if ("子丑寅".contains(nz) && "酉午未".contains(sz)) SZ6 = Z147;
        if ("卯辰巳".contains(nz) && "申戌亥".contains(sz)) SZ6 = Z147;
        if ("午未申".contains(nz) && "丑寅卯".contains(sz)) SZ6 = Z147;
        if ("酉戌亥".contains(nz) && "子辰巳".contains(sz)) SZ6 = Z147;
        LinkedHashMap<String, String> guimenguan = new LinkedHashMap<String, String>() {{
            put("子酉", Z147);
            put("丑午", Z147);
            put("寅未", Z147);
            put("卯申", Z147);
            put("辰亥", Z147);
            put("巳戌", Z147);
            put("午丑", Z147);
            put("未寅", Z147);
            put("申卯", Z147);
            put("酉子", Z147);
            put("戌巳", Z147);
            put("亥辰", Z147);
        }};
        String SZ2 = "", gejuguan = "", zhuqueguan = "", yupenguan = "", SZ5 = "", SZ9 = "", SZ10 = "", SZ12 = "";
        if ("子午卯酉".contains(nz) && "辰戌丑未".contains(sz)) SZ2 = Z148;
        if ("寅申巳亥".contains(nz) && "子午卯酉".contains(sz)) SZ2 = Z148;
        if ("辰戌丑未".contains(nz) && "寅申巳亥".contains(sz)) SZ2 = Z148;
        if ("寅卯辰".contains(yz) && "巳酉丑".contains(nz) && "巳酉丑".contains(rz) && "巳酉丑".contains(sz)) gejuguan = Z174;
        if ("巳午未".contains(yz) && "申子辰".contains(nz) && "申子辰".contains(rz) && "申子辰".contains(sz)) gejuguan = Z174;
        if ("申酉戌".contains(yz) && "寅午戌".contains(nz) && "寅午戌".contains(rz) && "寅午戌".contains(sz)) gejuguan = Z174;
        if ("亥子丑".contains(yz) && "亥卯未".contains(nz) && "亥卯未".contains(rz) && "亥卯未".contains(sz)) gejuguan = Z174;
        if ("寅卯辰".contains(yz) && "甲乙".contains(sg)) zhuqueguan = Z183;
        if ("巳午未".contains(yz) && "庚辛".contains(sg)) zhuqueguan = Z183;
        if ("申酉戌".contains(yz) && "丙丁".contains(sg)) zhuqueguan = Z183;
        if ("亥子丑".contains(yz) && "壬癸".contains(sg)) zhuqueguan = Z183;
        if ("寅卯辰".contains(yz) && sz.equals("辰")) yupenguan = Z184;
        if ("巳午未".contains(yz) && sz.equals("未")) yupenguan = Z184;
        if ("申酉戌".contains(yz) && sz.equals("戌")) yupenguan = Z184;
        if ("亥子丑".contains(yz) && sz.equals("丑")) yupenguan = Z184;
        if ("寅卯辰".contains(yz) && "未戌亥".contains(sz)) SZ5 = Z204;
        if ("巳午未".contains(yz) && "子辰巳".contains(sz)) SZ5 = Z204;
        if ("申酉戌".contains(yz) && "丑申酉".contains(sz)) SZ5 = Z204;
        if ("亥子丑".contains(yz) && "寅卯午".contains(sz)) SZ5 = Z204;
        if ("寅卯".contains(yz) && "丙".contains(rg)) SZ9 = Z221;
        if ("辰巳".contains(yz) && "乙丁己辛癸".contains(rg)) SZ9 = Z221;
        if ("午未".contains(yz) && "丁".contains(rg)) SZ9 = Z221;
        if ("申酉戌亥".contains(yz) && "壬癸".contains(rg)) SZ9 = Z221;
        if ("子丑".contains(yz) && "庚辛".contains(rg)) SZ9 = Z221;
        if ("寅卯".contains(yz) && "午".contains(sz)) SZ9 = Z221;
        if ("辰巳".contains(yz) && "未".contains(sz)) SZ9 = Z221;
        if ("午未".contains(yz) && "卯戌".contains(sz)) SZ9 = Z221;
        if ("申酉".contains(yz) && "巳申".contains(sz)) SZ9 = Z221;
        if ("戌亥".contains(yz) && "寅卯".contains(sz)) SZ9 = Z221;
        if ("子丑".contains(yz) && "辰酉".contains(sz)) SZ9 = Z221;
        if ("甲乙".contains(rg) && "巳酉丑".contains(sz)) SZ10 = Z222;
        if ("庚辛".contains(rg) && "亥卯未".contains(sz)) SZ10 = Z222;
        if ("壬癸".contains(rg) && "寅午戌".contains(sz)) SZ10 = Z222;
        if ("己戊丙丁".contains(rg) && "子".contains(sz)) SZ11 = Z223;
        if ("寅卯辰".contains(yz) && "戌未".contains(sz)) SZ12 = Z224;
        if ("巳午未".contains(yz) && "丑辰".contains(sz)) SZ12 = Z224;
        if ("申酉戌".contains(yz) && "丑戌酉".contains(sz)) SZ12 = Z224;
        if ("亥子丑".contains(yz) && "未辰丑".contains(sz)) SZ12 = Z224;
        LinkedHashMap<String, String> haitaisui = new LinkedHashMap<String, String>() {{
            put("子未", Z0);
            put("丑巳", Z0);
            put("寅巳", Z0);
            put("卯辰", Z0);
            put("辰卯", Z0);
            put("巳寅", Z0);
            put("午丑", Z0);
            put("未子", Z0);
            put("申亥", Z0);
            put("酉戌", Z0);
            put("戌酉", Z0);
            put("亥申", Z0);
        }};
        LinkedHashMap<String, String> zhibixi = new LinkedHashMap<String, String>() {{
            put("寅辰", Z2);
            put("寅戌", Z2);
            put("卯巳", Z2);
            put("卯亥", Z2);
            put("辰子", Z2);
            put("辰午", Z2);
            put("巳丑", Z2);
            put("巳未", Z2);
            put("午申", Z2);
            put("午寅", Z2);
            put("未酉", Z2);
            put("未卯", Z2);
            put("申辰", Z2);
            put("申戌", Z2);
            put("酉巳", Z2);
            put("酉亥", Z2);
            put("戌子", Z2);
            put("戌午", Z2);
            put("亥丑", Z2);
            put("亥未", Z2);
            put("子申", Z2);
            put("子寅", Z2);
            put("丑酉", Z2);
            put("丑卯", Z2);
        }};
        LinkedHashMap<String, String> tianzhuansha = new LinkedHashMap<String, String>() {{
            put("丑壬子", Z3);
            put("子壬子", Z3);
            put("亥壬子", Z3);
            put("戌辛酉", Z3);
            put("酉辛酉", Z3);
            put("申辛酉", Z3);
            put("未丙午", Z3);
            put("午丙午", Z3);
            put("巳丙午", Z3);
            put("辰乙卯", Z3);
            put("卯乙卯", Z3);
            put("寅乙卯", Z3);
        }};
        LinkedHashMap<String, String> dizhuansha = new LinkedHashMap<String, String>() {{
            put("寅辛卯", Z4);
            put("卯辛卯", Z4);
            put("辰辛卯", Z4);
            put("巳戊午", Z4);
            put("午戊午", Z4);
            put("未戊午", Z4);
            put("申癸酉", Z4);
            put("酉癸酉", Z4);
            put("戌癸酉", Z4);
            put("亥丙子", Z4);
            put("子丙子", Z4);
            put("丑丙子", Z4);
        }};
        LinkedHashMap<String, String> tianshe = new LinkedHashMap<String, String>() {{
            put("寅戊寅", Z5);
            put("卯戊寅", Z5);
            put("辰戊寅", Z5);
            put("巳甲午", Z5);
            put("午甲午", Z5);
            put("未甲午", Z5);
            put("申戊申", Z5);
            put("酉戊申", Z5);
            put("戌戊申", Z5);
            put("亥甲子", Z5);
            put("子甲子", Z5);
            put("丑甲子", Z5);
        }};
        LinkedHashMap<String, String> fantiango = new LinkedHashMap<String, String>() {{
            put("子戌", Z6);
            put("丑亥", Z6);
            put("寅子", Z6);
            put("卯丑", Z6);
            put("辰寅", Z6);
            put("巳卯", Z6);
            put("午辰", Z6);
            put("未巳", Z6);
            put("申午", Z6);
            put("酉未", Z6);
            put("戌申", Z6);
            put("亥酉", Z6);
        }};
        LinkedHashMap<String, String> yuanjutaohuajie = new LinkedHashMap<String, String>() {{
            put("申酉", Z9);
            put("子酉", Z9);
            put("辰酉", Z9);
            put("亥子", Z9);
            put("卯子", Z9);
            put("未子", Z9);
            put("巳午", Z9);
            put("酉午", Z9);
            put("丑午", Z9);
            put("寅卯", Z9);
            put("午卯", Z9);
            put("戌卯", Z9);
        }};
        LinkedHashMap<String, String> potaisui = new LinkedHashMap<String, String>() {{
            put("子酉", Z10);
            put("丑辰", Z10);
            put("寅亥", Z10);
            put("卯午", Z10);
            put("辰丑", Z10);
            put("巳申", Z10);
            put("午卯", Z10);
            put("未戌", Z10);
            put("申巳", Z10);
            put("酉子", Z10);
            put("戌未", Z10);
            put("亥寅", Z10);
        }};
        LinkedHashMap<String, String> guluansha = new LinkedHashMap<String, String>() {{
            put("乙巳", Z12);
            put("丁巳", Z12);
            put("辛亥", Z12);
            put("戊申", Z12);
            put("壬寅", Z12);
            put("戊午", Z12);
            put("壬子", Z12);
            put("丙午", Z12);
        }};
        LinkedHashMap<String, String> xingtaisui = new LinkedHashMap<String, String>() {{
            put("子卯", Z13);
            put("丑戌", Z13);
            put("寅巳", Z13);
            put("卯子", Z13);
            put("辰辰", Z13);
            put("巳寅", Z13);
            put("午午", Z13);
            put("未丑", Z13);
            put("申寅", Z13);
            put("酉酉", Z13);
            put("戌丑", Z13);
            put("亥亥", Z13);
        }};
        LinkedHashMap<String, String> maiersha = new LinkedHashMap<String, String>() {{
            put("申亥", Z24);
            put("卯戌", Z24);
            put("丑酉", Z24);
            put("申申", Z24);
            put("卯未", Z24);
            put("丑午", Z24);
            put("申巳", Z24);
            put("卯辰", Z24);
            put("丑卯", Z24);
            put("申寅", Z24);
            put("丑子", Z24);
            put("卯丑", Z24);
        }};
        pima = new LinkedHashMap<String, String>() {{
            put("寅亥", Z34);
            put("亥申", Z34);
            put("子酉", Z34);
            put("丑戌", Z34);
            put("戌未", Z34);
            put("酉午", Z34);
            put("申巳", Z34);
            put("未辰", Z34);
            put("午卯", Z34);
            put("巳寅", Z34);
            put("辰丑", Z34);
            put("卯子", Z34);
        }};
        LinkedHashMap<String, String> tianzaisha = new LinkedHashMap<String, String>() {{
            put("辛庚", Z36);
            put("己戊", Z36);
            put("丁丙", Z36);
            put("乙甲", Z36);
        }};
        LinkedHashMap<String, String> ziyisha = new LinkedHashMap<String, String>() {{
            put("巳戌", Z40);
            put("辰亥", Z40);
            put("子酉", Z40);
            put("卯申", Z40);
            put("寅未", Z40);
            put("丑午", Z40);
            put("亥辰", Z40);
            put("戌巳", Z40);
            put("申卯", Z40);
            put("酉子", Z40);
            put("未寅", Z40);
            put("午丑", Z40);
        }};
        LinkedHashMap<String, String> wuguixing = new LinkedHashMap<String, String>() {{
            put("辰子", Z42);
            put("巳丑", Z42);
            put("午寅", Z42);
            put("未卯", Z42);
            put("申辰", Z42);
            put("酉巳", Z42);
            put("子申", Z42);
            put("戌午", Z42);
            put("亥未", Z42);
            put("丑酉", Z42);
            put("寅戌", Z42);
            put("卯亥", Z42);
        }};
        LinkedHashMap<String, String> yinzhuyangsho = new LinkedHashMap<String, String>() {{
            put("子寅", Z43);
            put("丑丑", Z43);
            put("寅子", Z43);
            put("酉巳", Z43);
            put("戌辰", Z43);
            put("亥卯", Z43);
            put("子申", Z43);
            put("戌午", Z43);
            put("亥未", Z43);
            put("丑酉", Z43);
            put("寅戌", Z43);
            put("卯亥", Z43);
        }};
        LinkedHashMap<String, String> shuinisha = new LinkedHashMap<String, String>() {{
            put("未癸", Z52);
            put("丑癸", Z52);
            put("子丙", Z52);
        }};
        LinkedHashMap<String, String> yinyangsha = new LinkedHashMap<String, String>() {{
            put("子丙", Z54);
            put("午戊", Z54);
        }};
        LinkedHashMap<String, String> liuxia = new LinkedHashMap<String, String>() {{
            put("亥壬", Z57);
            put("午己", Z57);
            put("辰庚", Z57);
            put("卯辛", Z57);
            put("寅癸", Z57);
            put("戌乙", Z57);
            put("酉甲", Z57);
            put("申丁", Z57);
            put("未丙", Z57);
            put("巳戊", Z57);
        }};
        LinkedHashMap<String, String> feiren = new LinkedHashMap<String, String>() {{
            put("甲卯酉", Z58);
            put("乙寅申", Z58);
            put("丙午子", Z58);
            put("戊午子", Z58);
            put("丁未丑", Z58);
            put("己未丑", Z58);
            put("庚酉卯", Z58);
            put("辛戌辰", Z58);
            put("壬子午", Z58);
            put("癸丑未", Z58);
        }};
        LinkedHashMap<String, String> ziyishasj = new LinkedHashMap<String, String>() {{
            put("子卯", Z59);
            put("丑丑", Z59);
            put("寅丑", Z59);
            put("卯寅", Z59);
            put("辰巳", Z59);
            put("巳辰", Z59);
            put("午丑", Z59);
            put("未寅", Z59);
            put("申卯", Z59);
            put("酉午", Z59);
            put("戌巳", Z59);
            put("亥辰", Z59);
        }};
        LinkedHashMap<String, String> juehuoyan = new LinkedHashMap<String, String>() {{
            put("寅子", Z62);
            put("午子", Z62);
            put("卯子", Z62);
            put("巳午", Z62);
            put("子午", Z62);
            put("辰午", Z62);
            put("戌卯", Z62);
            put("亥卯", Z62);
            put("未卯", Z62);
            put("酉酉", Z62);
            put("申酉", Z62);
            put("丑酉", Z62);
        }};
        LinkedHashMap<String, String> kujiao = new LinkedHashMap<String, String>() {{
            put("寅辰", Z63);
            put("卯丑", Z63);
            put("辰戌", Z63);
            put("巳未", Z63);
            put("午卯", Z63);
            put("未子", Z63);
            put("申酉", Z63);
            put("酉午", Z63);
            put("戌寅", Z63);
            put("亥亥", Z63);
            put("子申", Z63);
            put("丑巳", Z63);
        }};
        LinkedHashMap<String, String> gusuipo = new LinkedHashMap<String, String>() {{
            put("寅巳", Z64);
            put("卯子", Z64);
            put("辰丑", Z64);
            put("巳申", Z64);
            put("午卯", Z64);
            put("未戌", Z64);
            put("申亥", Z64);
            put("酉午", Z64);
            put("戌未", Z64);
            put("亥寅", Z64);
            put("子酉", Z64);
            put("丑辰", Z64);
        }};
        LinkedHashMap<String, String> gejiaosha = new LinkedHashMap<String, String>() {{
            put("子寅", Z65);
            put("丑卯", Z65);
            put("寅辰", Z65);
            put("卯巳", Z65);
            put("辰午", Z65);
            put("巳未", Z65);
            put("午申", Z65);
            put("未酉", Z65);
            put("申戌", Z65);
            put("酉亥", Z65);
            put("戌子", Z65);
            put("亥丑", Z65);
        }};
        LinkedHashMap<String, String> liuxiuri = new LinkedHashMap<String, String>() {{
            put("丙午", Z67);
            put("丁未", Z67);
            put("戊子", Z67);
            put("戊午", Z67);
            put("己丑", Z67);
            put("己未", Z67);
        }};
        LinkedHashMap<String, String> bazhuanri = new LinkedHashMap<String, String>() {{
            put("甲寅", Z68);
            put("乙卯", Z68);
            put("丁未", Z68);
            put("戊戌", Z68);
            put("己未", Z68);
            put("庚申", Z68);
            put("辛酉", Z68);
            put("癸丑", Z68);
            put("己丑", Z68);
            put("戊辰", Z68);
        }};
        LinkedHashMap<String, String> tiebansha = new LinkedHashMap<String, String>() {{
            put("甲辰", Z69);
            put("己辰", Z69);
            put("乙寅", Z69);
            put("庚寅", Z69);
            put("丙酉", Z69);
            put("辛酉", Z69);
            put("丙戌", Z69);
            put("辛戌", Z69);
        }};
        LinkedHashMap<String, String> jiucho = new LinkedHashMap<String, String>() {{
            put("乙卯", Z70);
            put("戊子", Z70);
            put("己卯", Z70);
            put("辛卯", Z70);
            put("壬子", Z70);
            put("乙酉", Z70);
            put("戊午", Z70);
            put("己酉", Z70);
            put("辛酉", Z70);
            put("壬午", Z70);
        }};
        LinkedHashMap<String, String> zhibeisha = new LinkedHashMap<String, String>() {{
            put("巳巳", Z71);
            put("酉巳", Z71);
            put("丑巳", Z71);
            put("亥亥", Z71);
            put("卯亥", Z71);
            put("未亥", Z71);
            put("寅寅", Z71);
            put("午寅", Z71);
            put("戌寅", Z71);
            put("申申", Z71);
            put("子申", Z71);
            put("辰申", Z71);
        }};
        LinkedHashMap<String, String> tianxingsha = new LinkedHashMap<String, String>() {{
            put("寅庚", Z73);
            put("卯辛", Z73);
            put("辰辛", Z73);
            put("巳壬", Z73);
            put("午癸", Z73);
            put("未癸", Z73);
            put("申丙", Z73);
            put("酉丁", Z73);
            put("戌丁", Z73);
            put("亥戊", Z73);
            put("子乙", Z73);
            put("丑乙", Z73);
        }};
        LinkedHashMap<String, String> posuisha = new LinkedHashMap<String, String>() {{
            put("寅酉", Z74);
            put("卯巳", Z74);
            put("辰丑", Z74);
            put("巳酉", Z74);
            put("午巳", Z74);
            put("未丑", Z74);
            put("申酉", Z74);
            put("酉巳", Z74);
            put("戌丑", Z74);
            put("亥酉", Z74);
            put("子巳", Z74);
            put("丑丑", Z74);
        }};
        LinkedHashMap<String, String> shangsisha = new LinkedHashMap<String, String>() {{
            put("寅申", Z75);
            put("申子", Z75);
            put("午子", Z75);
            put("子午", Z75);
            put("酉卯", Z75);
            put("戌辰", Z75);
            put("己亥", Z75);
            put("丑未", Z75);
            put("辰戌", Z75);
        }};
        LinkedHashMap<String, String> polv = new LinkedHashMap<String, String>() {{
            put("申亥", Z76);
            put("子亥", Z76);
            put("辰亥", Z76);
            put("亥寅", Z76);
            put("卯寅", Z76);
            put("未寅", Z76);
            put("寅巳", Z76);
            put("午巳", Z76);
            put("戌巳", Z76);
            put("巳申", Z76);
            put("酉申", Z76);
            put("丑申", Z76);
        }};
        LinkedHashMap<String, String> huodeguiren = new LinkedHashMap<String, String>() {{
            put("亥丙", Z78);
            put("子丙", Z78);
            put("丑丙", Z78);
        }};
        LinkedHashMap<String, String> gonglv = new LinkedHashMap<String, String>() {{
            put("癸亥癸丑", Z79);
            put("癸丑癸亥", Z79);
            put("丁巳丁未", Z79);
            put("己未己巳", Z79);
            put("戊辰戊午", Z79);
        }};
        LinkedHashMap<String, String> doniusha = new LinkedHashMap<String, String>() {{
            put("乙丑丑", Z81);
        }};
        LinkedHashMap<String, String> huotong = new LinkedHashMap<String, String>() {{
            put("子亥", Z86);
            put("丑子", Z86);
            put("寅丑", Z86);
            put("卯寅", Z86);
            put("辰卯", Z86);
            put("巳辰", Z86);
            put("午巳", Z86);
            put("未午", Z86);
            put("申未", Z86);
            put("酉申", Z86);
            put("戌酉", Z86);
            put("亥戌", Z86);
        }};
        LinkedHashMap<String, String> tiantusha = new LinkedHashMap<String, String>() {{
            put("子午", Z87);
            put("丑亥", Z87);
            put("寅戌", Z87);
            put("卯酉", Z87);
            put("辰申", Z87);
            put("巳未", Z87);
        }};
        LinkedHashMap<String, String> wuguijingshensha = new LinkedHashMap<String, String>() {{
            put("木丑", Z88);
            put("木子", Z88);
            put("金午", Z88);
            put("金丑", Z88);
            put("水酉", Z88);
            put("水戌", Z88);
            put("土酉", Z88);
            put("土戌", Z88);
            put("火卯", Z88);
            put("火辰", Z88);
        }};
        LinkedHashMap<String, String> caifengsha = new LinkedHashMap<String, String>() {{
            put("寅甲", Z90);
            put("卯乙", Z90);
            put("辰戊", Z90);
            put("巳丙", Z90);
            put("午丁", Z90);
            put("未己", Z90);
            put("申庚", Z90);
            put("酉辛", Z90);
            put("戌戊", Z90);
            put("亥壬", Z90);
            put("子癸", Z90);
            put("丑己", Z90);
        }};
        LinkedHashMap<String, String> panan = new LinkedHashMap<String, String>() {{
            put("子丑", Z92);
            put("丑戌", Z92);
            put("寅未", Z92);
            put("卯辰", Z92);
            put("辰丑", Z92);
            put("巳戌", Z92);
            put("午未", Z92);
            put("未辰", Z92);
            put("申丑", Z92);
            put("酉戌", Z92);
            put("戌未", Z92);
            put("亥辰", Z92);
        }};
        LinkedHashMap<String, String> musha = new LinkedHashMap<String, String>() {{
            put("甲庚戌", Z95);
            put("甲庚辰", Z95);
            put("乙辛丑", Z95);
            put("乙辛未", Z95);
            put("丙壬辰", Z95);
            put("丙壬戌", Z95);
            put("丁癸丑", Z95);
            put("丁癸未", Z95);
            put("戊甲辰", Z95);
            put("戊甲戌", Z95);
            put("己乙丑", Z95);
            put("己乙未", Z95);
            put("庚丙辰", Z95);
            put("庚丙戌", Z95);
            put("辛丁丑", Z95);
            put("辛丁未", Z95);
            put("壬戊辰", Z95);
            put("壬戊戌", Z95);
            put("癸己丑", Z95);
            put("癸己未", Z95);
        }};
        LinkedHashMap<String, String> qingguoqingcheng = new LinkedHashMap<String, String>() {{
            put("甲申", Z97);
        }};
        LinkedHashMap<String, String> diyu = new LinkedHashMap<String, String>() {{
            put("子亥", Z99);
            put("丑子", Z99);
            put("寅丑", Z99);
            put("卯寅", Z99);
            put("辰卯", Z99);
            put("巳辰", Z99);
            put("午巳", Z99);
            put("未午", Z99);
            put("申未", Z99);
            put("酉申", Z99);
            put("戌酉", Z99);
            put("亥戌", Z99);
        }};
        LinkedHashMap<String, String> duhuo = new LinkedHashMap<String, String>() {{
            put("子未", Z100);
            put("丑申", Z100);
            put("寅酉", Z100);
            put("卯戌", Z100);
            put("辰亥", Z100);
            put("巳子", Z100);
            put("午丑", Z100);
            put("未寅", Z100);
            put("申卯", Z100);
            put("酉辰", Z100);
            put("戌巳", Z100);
            put("亥午", Z100);
        }};
        LinkedHashMap<String, String> fuchensha = new LinkedHashMap<String, String>() {{
            put("子戌", Z101);
            put("丑酉", Z101);
            put("寅申", Z101);
            put("卯未", Z101);
            put("辰午", Z101);
            put("巳巳", Z101);
            put("午辰", Z101);
            put("未卯", Z101);
            put("申寅", Z101);
            put("酉丑", Z101);
            put("戌子", Z101);
            put("亥亥", Z101);
        }};
        LinkedHashMap<String, String> fanghaisha = new LinkedHashMap<String, String>() {{
            put("甲寅", Z102);
            put("乙卯", Z102);
            put("丁未", Z102);
            put("戊戌", Z102);
            put("己未", Z102);
            put("庚申", Z102);
            put("辛酉", Z102);
            put("癸亥", Z102);
        }};
        LinkedHashMap<String, String> tianhao = new LinkedHashMap<String, String>() {{
            put("寅子", Z103);
            put("申子", Z103);
            put("卯寅", Z103);
            put("酉寅", Z103);
            put("辰辰", Z103);
            put("戌辰", Z103);
            put("巳午", Z103);
            put("亥午", Z103);
            put("午申", Z103);
            put("子申", Z103);
            put("丑戌", Z103);
            put("未戌", Z103);
        }};
        LinkedHashMap<String, String> pingtosha = new LinkedHashMap<String, String>() {{
            put("甲子", Z105);
            put("丙寅", Z105);
            put("丁卯", Z105);
            put("戊辰", Z105);
            put("壬申", Z105);
            put("甲戌", Z105);
            put("丙子", Z105);
            put("丁丑", Z105);
            put("庚辰", Z105);
            put("壬午", Z105);
            put("甲申", Z105);
            put("丙戌", Z105);
            put("丁亥", Z105);
            put("甲午", Z105);
            put("丙申", Z105);
            put("丁酉", Z105);
            put("壬寅", Z105);
            put("壬辰", Z105);
            put("丙午", Z105);
            put("丁未", Z105);
            put("壬子", Z105);
            put("甲寅", Z105);
            put("丙辰", Z105);
            put("丁巳", Z105);
            put("壬戌", Z105);
        }};
        LinkedHashMap<String, String> xuanliangsha = new LinkedHashMap<String, String>() {{
            put("甲子", Z106);
            put("庚午", Z106);
            put("乙丑", Z106);
            put("癸未", Z106);
            put("丙寅", Z106);
            put("丙申", Z106);
            put("丁卯", Z106);
            put("己酉", Z106);
        }};
        LinkedHashMap<String, String> xueren = new LinkedHashMap<String, String>() {{
            put("子午", Z107);
            put("丑子", Z107);
            put("寅丑", Z107);
            put("卯未", Z107);
            put("辰寅", Z107);
            put("巳申", Z107);
            put("午卯", Z107);
            put("未酉", Z107);
            put("申辰", Z107);
            put("酉戌", Z107);
            put("戌巳", Z107);
            put("亥亥", Z107);
        }};
        LinkedHashMap<String, String> xuezhi = new LinkedHashMap<String, String>() {{
            put("子戌", Z110);
            put("丑酉", Z110);
            put("寅申", Z110);
            put("卯未", Z110);
            put("辰午", Z110);
            put("巳巳", Z110);
            put("午辰", Z110);
            put("未卯", Z110);
            put("申寅", Z110);
            put("酉丑", Z110);
            put("戌子", Z110);
            put("亥亥", Z110);
        }};
        LinkedHashMap<String, String> zhitaisui = new LinkedHashMap<String, String>() {{
            put("子子", Z111);
            put("丑丑", Z111);
            put("寅寅", Z111);
            put("卯卯", Z111);
            put("辰辰", Z111);
            put("巳巳", Z111);
            put("午午", Z111);
            put("未未", Z111);
            put("申申", Z111);
            put("酉酉", Z111);
            put("戌戌", Z111);
            put("亥亥", Z111);
        }};
        LinkedHashMap<String, String> chongtaisui = new LinkedHashMap<String, String>() {{
            put("子午", Z112);
            put("丑未", Z112);
            put("寅申", Z112);
            put("卯酉", Z112);
            put("辰戌", Z112);
            put("巳亥", Z112);
            put("午子", Z112);
            put("未丑", Z112);
            put("申寅", Z112);
            put("酉卯", Z112);
            put("戌辰", Z112);
            put("亥巳", Z112);
        }};
        LinkedHashMap<String, String> qigaiguiren = new LinkedHashMap<String, String>() {{
            put("寅甲午", Z114);
            put("卯甲辰", Z114);
            put("辰甲寅", Z114);
            put("巳甲子", Z114);
            put("午甲申", Z114);
            put("未甲戌", Z114);
            put("申乙", Z114);
            put("申丙", Z114);
            put("申丁", Z114);
            put("酉壬", Z114);
            put("酉癸", Z114);
            put("酉辛", Z114);
            put("戌甲", Z114);
            put("戌戊", Z114);
            put("戌庚", Z114);
            put("亥庚", Z114);
            put("亥辛", Z114);
            put("子壬", Z114);
            put("丑辰", Z114);
        }};
        LinkedHashMap<String, String> caishenguiren = new LinkedHashMap<String, String>() {{
            put("寅甲", Z115);
            put("卯乙", Z115);
            put("辰丙", Z115);
            put("巳丁", Z115);
            put("午戊", Z115);
            put("未己", Z115);
            put("申庚", Z115);
            put("酉辛", Z115);
            put("戌壬", Z115);
            put("亥癸", Z115);
            put("子戌", Z115);
            put("子亥", Z115);
            put("丑未", Z115);
            put("丑申", Z115);
        }};
        LinkedHashMap<String, String> liuqinguiren = new LinkedHashMap<String, String>() {{
            put("寅乙庚", Z116);
            put("卯乙庚", Z116);
            put("辰乙庚", Z116);
            put("巳丙辛", Z116);
            put("午丙辛", Z116);
            put("未丙辛", Z116);
            put("申丁壬", Z116);
            put("酉丁壬", Z116);
            put("戌丁壬", Z116);
            put("亥戊癸", Z116);
            put("子戊癸", Z116);
            put("丑戊癸", Z116);
        }};
        LinkedHashMap<String, String> zhangshngsha = new LinkedHashMap<String, String>() {{
            put("寅子午", Z117);
            put("卯子午", Z117);
            put("辰子午", Z117);
            put("巳丑未", Z117);
            put("午丑未", Z117);
            put("未丑未", Z117);
            put("申寅申", Z117);
            put("酉寅申", Z117);
            put("戌寅申", Z117);
            put("亥卯酉", Z117);
            put("子卯酉", Z117);
            put("丑卯酉", Z117);
        }};
        LinkedHashMap<String, String> luoti = new LinkedHashMap<String, String>() {{
            put("庚午", Z118);
            put("辛亥", Z118);
        }};
        LinkedHashMap<String, String> zhentaohua = new LinkedHashMap<String, String>() {{
            put("甲子", Z119);
            put("乙巳", Z119);
            put("丙卯", Z119);
            put("丁酉", Z119);
            put("戊卯", Z119);
            put("己酉", Z119);
            put("庚午", Z119);
            put("辛亥", Z119);
            put("壬酉", Z119);
            put("癸亥", Z119);
        }};
        LinkedHashMap<String, String> zhengtaohua = new LinkedHashMap<String, String>() {{
            put("甲卯", Z120);
            put("乙卯", Z120);
            put("丙子", Z120);
            put("丁子", Z120);
            put("戊午", Z120);
            put("己午", Z120);
            put("庚巳", Z120);
            put("辛巳", Z120);
            put("壬午", Z120);
            put("癸午", Z120);
            put("甲亥", Z120);
            put("乙亥", Z120);
            put("丙申", Z120);
            put("丁申", Z120);
            put("戊戌", Z120);
            put("己戌", Z120);
            put("庚亥", Z120);
            put("辛亥", Z120);
            put("壬戌", Z120);
            put("癸戌", Z120);
        }};
        LinkedHashMap<String, String> pinqiongsha = new LinkedHashMap<String, String>() {{
            put("寅壬", Z121);
            put("卯壬", Z121);
            put("辰壬", Z121);
            put("巳癸", Z121);
            put("午癸", Z121);
            put("未癸", Z121);
            put("申壬戌", Z121);
            put("酉壬戌", Z121);
            put("戌壬戌", Z121);
            put("亥癸亥", Z121);
            put("子癸亥", Z121);
            put("丑癸亥", Z121);
        }};
        LinkedHashMap<String, String> zaijiasha = new LinkedHashMap<String, String>() {{
            put("子午", Z122);
            put("丑未", Z122);
            put("寅申", Z122);
            put("卯酉", Z122);
            put("辰戌", Z122);
            put("巳亥", Z122);
            put("午子", Z122);
            put("未丑", Z122);
            put("申寅", Z122);
            put("酉卯", Z122);
            put("戌辰", Z122);
            put("亥巳", Z122);
        }};
        LinkedHashMap<String, String> pitosha = new LinkedHashMap<String, String>() {{
            put("子辰", Z123);
            put("丑卯", Z123);
            put("寅寅", Z123);
            put("卯丑", Z123);
            put("辰子", Z123);
            put("巳亥", Z123);
            put("午戌", Z123);
            put("未酉", Z123);
            put("申申", Z123);
            put("酉未", Z123);
            put("戌午", Z123);
            put("亥巳", Z123);
        }};
        LinkedHashMap<String, String> tundansha = new LinkedHashMap<String, String>() {{
            put("亥寅", Z124);
            put("戌寅", Z124);
            put("未寅", Z124);
            put("申巳", Z124);
            put("酉戌", Z124);
            put("卯巳", Z124);
            put("子戌", Z124);
            put("午寅", Z124);
            put("丑寅", Z124);
            put("卯戌", Z124);
            put("申戌", Z124);
            put("辰未", Z124);
        }};
        LinkedHashMap<String, String> jueliangsha = new LinkedHashMap<String, String>() {{
            put("寅巳", Z125);
            put("卯酉", Z125);
            put("辰丑", Z125);
            put("巳辰", Z125);
            put("午申", Z125);
            put("未子", Z125);
            put("申卯", Z125);
            put("酉未", Z125);
            put("戌亥", Z125);
            put("亥寅", Z125);
            put("子午", Z125);
            put("丑戌", Z125);
        }};
        LinkedHashMap<String, String> tieqiusha = new LinkedHashMap<String, String>() {{
            put("甲辰", Z126);
            put("乙寅", Z126);
            put("丙巳", Z126);
            put("丁申", Z126);
            put("戊午", Z126);
            put("己辰", Z126);
            put("庚寅", Z126);
            put("辛巳", Z126);
            put("壬申", Z126);
            put("癸午", Z126);
        }};
        LinkedHashMap<String, String> huagaizimu = new LinkedHashMap<String, String>() {{
            put("甲戌戌", Z128);
            put("癸未亥", Z128);
            put("乙丑酉", Z128);
            put("甲戌午", Z128);
            put("癸未未", Z128);
            put("壬辰申", Z128);
            put("癸未卯", Z128);
            put("壬辰辰", Z128);
            put("乙丑巳", Z128);
            put("甲戌寅", Z128);
            put("壬辰子", Z128);
            put("乙丑丑", Z128);
            put("丙戌戌", Z128);
            put("丙戌午", Z128);
            put("丙戌寅", Z128);
        }};
        LinkedHashMap<String, String> sanqiuwumu = new LinkedHashMap<String, String>() {{
            put("寅辛丑", Z200);
            put("卯辛丑", Z200);
            put("辰辛丑", Z200);
            put("巳壬辰", Z200);
            put("午壬辰", Z200);
            put("未壬辰", Z200);
            put("申乙未", Z200);
            put("酉乙未", Z200);
            put("戌乙未", Z200);
            put("亥丙戌", Z200);
            put("子丙戌", Z200);
            put("丑丙戌", Z200);
            put("寅乙未", Z200);
            put("卯乙未", Z200);
            put("辰戌辰", Z200);
            put("巳丙戌", Z200);
            put("午丙戌", Z200);
            put("未戌辰", Z200);
            put("申辛丑", Z200);
            put("酉寅丑", Z200);
            put("戌戌辰", Z200);
            put("亥壬辰", Z200);
            put("子壬辰", Z200);
            put("丑戌辰", Z200);
        }};
        LinkedHashMap<String, String> tiesaozho = new LinkedHashMap<>();
        LinkedHashMap<String, String> bingxiaowajie = new LinkedHashMap<>();
        LinkedHashMap<String, String> jiangjunjian = new LinkedHashMap<>();
        LinkedHashMap<String, String> jiangjungong = new LinkedHashMap<>();
        LinkedHashMap<String, String> tiansaoxing = new LinkedHashMap<>();
        LinkedHashMap<String, String> guigangguiren = new LinkedHashMap<>();
        LinkedHashMap<String, String> guafusha = new LinkedHashMap<>();
        LinkedHashMap<String, String> disaoxing = new LinkedHashMap<>();
        String RZ11 = "";
        switch (sex) {
            case 0:
                tiesaozho = new LinkedHashMap<String, String>() {{
                    put("申寅", Z130);
                    put("子寅", Z130);
                    put("辰寅", Z130);
                    put("巳未", Z130);
                    put("酉未", Z130);
                    put("丑未", Z130);
                    put("寅巳", Z130);
                    put("午巳", Z130);
                    put("戌巳", Z130);
                    put("亥卯", Z130);
                    put("卯卯", Z130);
                    put("未卯", Z130);
                }};
                bingxiaowajie = new LinkedHashMap<String, String>() {{
                    put("寅巳", Z131);
                    put("卯子", Z131);
                    put("辰丑", Z131);
                    put("巳申", Z131);
                    put("午卯", Z131);
                    put("未戌", Z131);
                    put("申亥", Z131);
                    put("酉午", Z131);
                    put("戌未", Z131);
                    put("亥寅", Z131);
                    put("子酉", Z131);
                    put("丑辰", Z131);
                }};
                jiangjunjian = new LinkedHashMap<String, String>() {{
                    put("寅酉", Z133);
                    put("卯酉", Z133);
                    put("辰酉", Z133);
                    put("巳未", Z134);
                    put("午未", Z134);
                    put("未未", Z134);
                    put("申寅", Z135);
                    put("酉寅", Z135);
                    put("戌寅", Z135);
                    put("亥亥", Z136);
                    put("子亥", Z136);
                    put("丑亥", Z136);
                    put("寅戌", Z133);
                    put("卯戌", Z133);
                    put("辰戌", Z133);
                    put("巳卯", Z134);
                    put("午卯", Z134);
                    put("未卯", Z134);
                    put("申午", Z135);
                    put("酉午", Z135);
                    put("戌午", Z135);
                    put("亥申", Z136);
                    put("子申", Z136);
                    put("丑申", Z136);
                    put("寅辰", Z133);
                    put("卯辰", Z133);
                    put("辰辰", Z133);
                    put("巳子", Z134);
                    put("午子", Z134);
                    put("未子", Z134);
                    put("申丑", Z135);
                    put("酉丑", Z135);
                    put("戌丑", Z135);
                    put("亥巳", Z136);
                    put("子巳", Z136);
                    put("丑巳", Z136);
                }};
                jiangjungong = new LinkedHashMap<String, String>() {{
                    put("子午", Z137);
                    put("卯酉", Z137);
                    put("辰戌", Z137);
                    put("丑未", Z137);
                    put("寅申", Z137);
                    put("巳亥", Z137);
                }};
                tiansaoxing = new LinkedHashMap<String, String>() {{
                    put("甲癸", Z138);
                    put("乙壬", Z138);
                    put("丙辛", Z138);
                    put("丁庚", Z138);
                    put("戊己", Z138);
                    put("己戊", Z138);
                    put("庚丁", Z138);
                    put("辛丙", Z138);
                    put("壬乙", Z138);
                    put("癸甲", Z138);
                    put("甲未", Z138);
                    put("乙午", Z138);
                    put("丙巳", Z138);
                    put("丁辰", Z138);
                    put("戊卯", Z138);
                    put("己寅", Z138);
                    put("庚丑", Z138);
                    put("辛子", Z138);
                    put("壬亥", Z138);
                    put("癸戌", Z138);
                }};
                guigangguiren = new LinkedHashMap<String, String>() {{
                    put("壬辰", Z226);
                    put("戊戌", Z226);
                }};
                break;
            case 1:
                guafusha = new LinkedHashMap<String, String>() {{
                    put("甲巳", Z129);
                    put("乙子", Z129);
                    put("丙申", Z129);
                    put("戊申", Z129);
                    put("丁卯", Z129);
                    put("己卯", Z129);
                    put("庚亥", Z129);
                    put("辛午", Z129);
                    put("壬寅", Z129);
                    put("癸酉", Z129);
                }};
                tiesaozho = new LinkedHashMap<String, String>() {{
                    put("申丑", Z130);
                    put("子丑", Z130);
                    put("辰丑", Z130);
                    put("巳戌", Z130);
                    put("酉戌", Z130);
                    put("丑戌", Z130);
                    put("寅申", Z130);
                    put("午申", Z130);
                    put("戌申", Z130);
                    put("亥酉", Z130);
                    put("卯酉", Z130);
                    put("未酉", Z130);
                }};
                bingxiaowajie = new LinkedHashMap<String, String>() {{
                    put("寅卯", Z131);
                    put("寅未", Z131);
                    put("寅亥", Z131);
                    put("辰申", Z131);
                    put("辰午", Z131);
                    put("辰戌", Z131);
                    put("巳丑", Z131);
                    put("巳巳", Z131);
                    put("巳酉", Z131);
                    put("未子", Z131);
                    put("未辰", Z131);
                    put("未申", Z131);
                }};
                disaoxing = new LinkedHashMap<String, String>() {{
                    put("金午", Z139);
                    put("土卯", Z139);
                    put("木卯", Z139);
                    put("水酉", Z139);
                    put("火子", Z139);
                    put("金未", Z139);
                    put("土辰", Z139);
                    put("木辰", Z139);
                    put("水戌", Z139);
                    put("火丑", Z139);
                    put("金申", Z139);
                    put("土巳", Z139);
                    put("木巳", Z139);
                    put("水亥", Z139);
                    put("火寅", Z139);
                }};
                guigangguiren = new LinkedHashMap<String, String>() {{
                    put("庚戌", Z225);
                    put("庚辰", Z225);
                }};
                if ((rg + rz + sg + sz).equals("庚戌乙酉")) RZ11 = Z227;
                break;
        }
        String NZ1 = "", RZ1 = "", NZ2 = "", NZ5 = "", NZ6 = "", NZ7 = "", NZ8 = "", YZ3 = "";
        if ((ng + nz).equals((yg + yz))) NZ1 = Z144;
        if ((rg + rz).equals((sg + sz))) RZ1 = Z144;
        if ((nz + yz + rz + sz).contains("卯") && ((nz + yz + rz + sz).contains("午"))) NZ2 = Z146;
        if ((nz + yz + rz + sz).contains("丑") && ((nz + yz + rz + sz).contains("辰"))) NZ2 = Z146;
        if ((nz + yz + rz + sz).contains("子") && ((nz + yz + rz + sz).contains("酉"))) NZ2 = Z146;
        if ((nz + yz + rz + sz).contains("未") && ((nz + yz + rz + sz).contains("戌"))) NZ2 = Z146;
        if (CommonUtil.substrCount((nz + yz + rz + sz), "亥") > 1) NZ5 = Z150;
        if (CommonUtil.substrCount((nz + yz + rz + sz), "巳") > 1) NZ6 = Z151;
        if (CommonUtil.substrCount((nz + yz + rz + sz), "亥") > 1 && CommonUtil.substrCount((nz + yz + rz + sz), "巳") > 0)
            NZ5 = Z152;
        if (CommonUtil.substrCount((nz + yz + rz + sz), "亥") > 0 && CommonUtil.substrCount((nz + yz + rz + sz), "巳") > 1)
            NZ6 = Z152;
        if (CommonUtil.substrCount((nz + rz), "寅") > 0 && CommonUtil.substrCount((nz + yz + rz + sz), "申") > 0)
            NZ7 = Z153;
        if (CommonUtil.substrCount((nz + rz), "巳") > 0 && CommonUtil.substrCount((nz + yz + rz + sz), "亥") > 0)
            NZ8 = Z154;
        if (sex == 0 && Arrays.asList("木卯", "木辰", "木巳", "土卯", "土辰", "土巳", "金午", "金未", "金申", "水酉", "水戌", "水亥", "火子", "火丑", "火寅").contains(NYWX + yz)) {
            YZ3 = Z160;
        }
        if (sex == 1 && Arrays.asList("水卯", "水辰", "水巳", "火卯", "火辰", "火巳", "土午", "土未", "土申", "金酉", "金戌", "金亥", "木子", "木丑", "木寅").contains(NYWX + yz)) {
            YZ3 = Z160;
        }
        String YZ4 = "", RZ7 = "", SZ3 = "", RZ8 = "", RZ9 = "", NZ9 = "", SZ4 = "", hongshari = "", huangshari = "", tiannanri = "", qiongkuri = "";
        if (yz.contains("寅") || yz.contains("卯") || yz.contains("辰"))
            if ((nz + yz + rz + sz).contains("亥") && (nz + yz + rz + sz).contains("卯") && (nz + yz + rz + sz).contains("未"))
                YZ4 = Z161;
        if (yz.contains("巳") || yz.contains("午") || yz.contains("未"))
            if ((nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("戌"))
                YZ4 = Z161;
        if (yz.contains("申") || yz.contains("酉") || yz.contains("戌"))
            if ((nz + yz + rz + sz).contains("巳") && (nz + yz + rz + sz).contains("酉") && (nz + yz + rz + sz).contains("丑"))
                YZ4 = Z161;
        if (yz.contains("亥") || yz.contains("子") || yz.contains("丑"))
            if ((nz + yz + rz + sz).contains("申") && (nz + yz + rz + sz).contains("子") && (nz + yz + rz + sz).contains("辰"))
                YZ4 = Z161;
        if ((rg + rz).contains("丁亥") || (rg + rz).contains("癸卯"))
            if (sz.contains("卯") || sz.contains("辰") || sz.contains("巳") || sz.contains("午") || sz.contains("未") || sz.contains("申"))
                RZ7 = Z162;
        if ((rg + rz).contains("丁酉") || (rg + rz).contains("癸巳"))
            if (sz.contains("酉") || sz.contains("戌") || sz.contains("亥") || sz.contains("子") || sz.contains("丑") || sz.contains("寅"))
                RZ7 = Z163;
        if (sex == 1) {
            if (yz.contains("寅") || yz.contains("卯") || yz.contains("辰"))
                if ((rg + rz).contains("戊寅") && (sg + sz).contains("甲寅") || (sg + sz).contains("癸丑")) SZ3 = Z164;
            if (yz.contains("巳") || yz.contains("午") || yz.contains("未"))
                if ((rg + rz).contains("甲午") && (sg + sz).contains("庚午") || (sg + sz).contains("辛未")) SZ3 = Z164;
            if (yz.contains("申") || yz.contains("酉") || yz.contains("戌"))
                if ((rg + rz).contains("戊申") && (sg + sz).contains("戊午") || (sg + sz).contains("己未")) SZ3 = Z164;
            if (yz.contains("亥") || yz.contains("子") || yz.contains("丑"))
                if ((rg + rz).contains("甲子") && (sg + sz).contains("甲子") || (sg + sz).contains("乙丑")) SZ3 = Z164;
        }
        if ("巳酉丑申".contains(nz) && "巳酉丑申".contains(yz) && "巳酉丑申".contains(rz) && "巳酉丑申".contains(sz)) RZ8 = Z165;
        if ((nz + yz + rz + sz).contains("亥") && rz.equals("巳")) RZ8 = Z165;
        if ((nz + yz + rz + sz).contains("卯") && rz.equals("酉")) RZ8 = Z165;
        if ((nz + yz + rz + sz).contains("未") && rz.equals("丑")) RZ8 = Z165;
        if ((nz + yz + rz + sz).contains("寅") && rz.equals("申")) RZ8 = Z165;
        if ((nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("戌") && ztg.contains("丙"))
            RZ9 = Z166;
        if ((nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("戌") && ztg.contains("丁"))
            RZ9 = Z166;
        if ((ng + nz).equals("甲子") && (rg + rz).equals("甲子") && (sg + sz).equals("甲子")) NZ9 = Z167;
        if ((ng + nz).equals("甲戌") && (rg + rz).equals("甲戌") && (sg + sz).equals("甲戌")) NZ9 = Z167;
        if ((ng + nz).equals("甲申") && (rg + rz).equals("甲申") && (sg + sz).equals("甲子")) NZ9 = Z167;
        if ((ng + nz).equals("甲午") && (rg + rz).equals("甲午") && (sz.equals("午"))) NZ9 = Z167;
        if ((ng + nz).equals("甲辰") && (rg + rz).equals("甲辰") && (sz.equals("辰"))) NZ9 = Z167;
        if ((ng + nz).equals("甲寅") && (rg + rz).equals("甲寅") && (sz.equals("寅"))) NZ9 = Z167;
        if ("申子辰".contains(nz) && "巳午".contains(yz) && sz.equals("巳")) SZ4 = Z168;
        if ("亥卯未".contains(nz) && "申酉".contains(yz) && sz.equals("申")) SZ4 = Z168;
        if ("巳酉丑".contains(nz) && "寅卯".contains(yz) && sz.equals("寅")) SZ4 = Z168;
        if ("寅午戌".contains(nz) && "亥子".contains(yz) && sz.equals("亥")) SZ4 = Z168;
        if ("寅巳申亥".contains(yz) && rz.equals("酉")) hongshari = Z169;
        if ("卯午酉子".contains(yz) && rz.equals("巳")) hongshari = Z169;
        if ("辰未戌丑".contains(yz) && rz.equals("丑")) hongshari = Z169;
        if ("寅巳申亥".contains(yz) && rz.equals("午")) huangshari = Z170;
        if ("卯午酉子".contains(yz) && rz.equals("寅")) huangshari = Z170;
        if ("辰未戌丑".contains(yz) && rz.equals("戌")) huangshari = Z170;
        if ("寅卯辰".contains(yz) && (rg + rz).equals("甲子")) tiannanri = Z171;
        if ("巳午未".contains(yz) && (rg + rz).equals("戊申")) tiannanri = Z171;
        if ("申酉戌".contains(yz) && (rg + rz).equals("甲午")) tiannanri = Z171;
        if ("亥子丑".contains(yz) && (rg + rz).equals("戊寅")) tiannanri = Z171;
        if ("庚申戊子".contains(rg + rz)) qiongkuri = Z172;
        String weixieri = "", wangmenguasha = "", toshengsha = "", wuhosha = "", jielukongwang = "", fuqisha = "";
        if ((rg + rz + sex).equals("癸亥0") || (rg + rz + sex).equals("癸巳1")) weixieri = Z173;
        if (sex == 1) {
            if ("水火".contains(NYWX) && "卯未".contains(yz)) wangmenguasha = Z175;
            if (NYWX.equals("金") && "酉戌".contains(yz)) wangmenguasha = Z175;
            if (NYWX.equals("土") && "巳申".contains(yz)) wangmenguasha = Z175;
            if (NYWX.equals("木") && "子丑".contains(yz)) wangmenguasha = Z175;
        }
        if ("水火".contains(NYWX) && "酉戌".contains(sz)) toshengsha = Z176;
        if ("木土".contains(NYWX) && sz.equals("未")) toshengsha = Z176;
        if (NYWX.equals("金") && "午卯".contains(sz)) toshengsha = Z176;
        if ("寅卯辰".contains(yz) && "己巳戊辰".contains(rg + rz)) wuhosha = Z177;
        if ("巳午未".contains(yz) && "癸未壬午".contains(rg + rz)) wuhosha = Z177;
        if ("申酉戌".contains(yz) && "辛卯庚寅".contains(rg + rz)) wuhosha = Z177;
        if ("亥子丑".contains(yz) && "己亥戊戌".contains(rg + rz)) wuhosha = Z177;
        if ("甲己".contains(rg) && "申酉".contains(sz)) jielukongwang = Z178;
        if ("乙庚".contains(rg) && "午未".contains(sz)) jielukongwang = Z178;
        if ("丙辛".contains(rg) && "辰巳".contains(sz)) jielukongwang = Z178;
        if ("丁壬".contains(rg) && "寅卯".contains(sz)) jielukongwang = Z178;
        if ("戊癸".contains(rg) && "子丑".contains(sz)) jielukongwang = Z178;
        if (sex == 1) {
            if ((nz + yz + rz + sz).contains("子") && (nz + yz + rz + sz).contains("亥") && (nz + yz + rz + sz).contains("卯") && (nz + yz + rz + sz).contains("未"))
                fuqisha = Z179;
            if ((nz + yz + rz + sz).contains("卯") && (nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("戌"))
                fuqisha = Z179;
            if ((nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("巳") && (nz + yz + rz + sz).contains("酉") && (nz + yz + rz + sz).contains("丑"))
                fuqisha = Z179;
            if ((nz + yz + rz + sz).contains("酉") && (nz + yz + rz + sz).contains("申") && (nz + yz + rz + sz).contains("子") && (nz + yz + rz + sz).contains("辰"))
                fuqisha = Z179;
        }
        String tingtangsha = "", anjinsha = "", saotiechuang = "", lianzhuren = "";
        if (nz.equals(yz) && nz.equals(rz) && nz.equals(sz)) tingtangsha = Z180;
        if ("子午卯酉".contains(nz) && (rz + sz).contains("巳")) anjinsha = Z181;
        if ("寅申巳亥".contains(nz) && (rz + sz).contains("酉")) anjinsha = Z181;
        if ("辰戌丑未".contains(nz) && (rz + sz).contains("丑")) anjinsha = Z181;
        if (sz.equals("辰") && "甲己".contains(ng)) saotiechuang = Z182;
        if (sz.equals("寅") && "乙庚".contains(ng)) saotiechuang = Z182;
        if (sz.equals("戌") && "丙辛".contains(ng)) saotiechuang = Z182;
        if (sz.equals("申") && "丁壬".contains(ng)) saotiechuang = Z182;
        if (sz.equals("酉") && "戊癸".contains(ng)) saotiechuang = Z182;
        if (sex == 1) {
            if ((ng + nz + yg + yz + rg + rz + sg + sz).contains("庚戌") && (ng + nz + yg + yz + rg + rz + sg + sz).contains("辛酉"))
                lianzhuren = Z185;
            if ((ng + nz + yg + yz + rg + rz + sg + sz).contains("戊午") && (ng + nz + yg + yz + rg + rz + sg + sz).contains("己未"))
                lianzhuren = Z185;
            if ((ng + nz + yg + yz + rg + rz + sg + sz).contains("丙午") && (ng + nz + yg + yz + rg + rz + sg + sz).contains("丁未"))
                lianzhuren = Z185;
            if ((ng + nz + yg + yz + rg + rz + sg + sz).contains("甲辰") && (ng + nz + yg + yz + rg + rz + sg + sz).contains("乙卯"))
                lianzhuren = Z185;
            if ((ng + nz + yg + yz + rg + rz + sg + sz).contains("壬子") && (ng + nz + yg + yz + rg + rz + sg + sz).contains("癸丑"))
                lianzhuren = Z185;
        }
        String rentogui = "", rentocai = "", limusha = "", lifusha = "", nianrihuhuan = "", rishihuhuan = "";
        if ("甲辛卯乙庚辰丙壬午丁癸未戊甲午己乙未庚丁酉辛丙戌壬戊子癸己丑".contains(rg + ng + nz)) rentogui = Z186;
        if ("甲辛卯乙庚辰丙壬午丁癸未戊甲午己乙未庚丁酉辛丙戌壬戊子癸己丑".contains(rg + yg + yz)) rentogui = Z186;
        if ("甲辛卯乙庚辰丙壬午丁癸未戊甲午己乙未庚丁酉辛丙戌壬戊子癸己丑".contains(rg + sg + sz)) rentogui = Z186;
        if ("甲己卯乙戊辰丙庚午丁辛未戊壬午己癸未庚乙酉辛甲戌壬丙子癸丁丑".contains(rg + ng + nz)) rentocai = Z187;
        if ("甲己卯乙戊辰丙庚午丁辛未戊壬午己癸未庚乙酉辛甲戌壬丙子癸丁丑".contains(rg + yg + yz)) rentocai = Z187;
        if ("甲己卯乙戊辰丙庚午丁辛未戊壬午己癸未庚乙酉辛甲戌壬丙子癸丁丑".contains(rg + sg + sz)) rentocai = Z187;
        if ("寅卯辰".contains(yz) && CommonUtil.substrCount((ng + nz + rg + rz + sg + sz), "甲子") > 1) limusha = Z188;
        if ("巳午未".contains(yz) && CommonUtil.substrCount((ng + nz + rg + rz + sg + sz), "戊寅") > 1) limusha = Z188;
        if ("申酉戌".contains(yz) && CommonUtil.substrCount((nz + rz + sz), "午") > 1) limusha = Z188;
        if ("亥子丑".contains(yz) && CommonUtil.substrCount((nz + rz + sz), "申") > 1) limusha = Z188;
        if ((nz + yz + rz + sz).contains("亥") && (nz + yz + rz + sz).contains("卯") && (nz + yz + rz + sz).contains("未") && (NY.get(ng + nz).get(0) + NY.get(yg + yz).get(0) + NY.get(rg + rz).get(0) + NY.get(sg + sz).get(0)).contains("炉中火"))
            lifusha = Z189;
        if ((nz + yz + rz + sz).contains("寅") && (nz + yz + rz + sz).contains("午") && (nz + yz + rz + sz).contains("戌") && (NY.get(ng + nz).get(0) + NY.get(yg + yz).get(0) + NY.get(rg + rz).get(0) + NY.get(sg + sz).get(0)).contains("山下火"))
            lifusha = Z189;
        if ((nz + yz + rz + sz).contains("巳") && (nz + yz + rz + sz).contains("酉") && (nz + yz + rz + sz).contains("丑") && (NY.get(ng + nz).get(0) + NY.get(yg + yz).get(0) + NY.get(rg + rz).get(0) + NY.get(sg + sz).get(0)).contains("天上火"))
            lifusha = Z189;
        if ((NY.get(ng + nz).get(2) + NY.get(ng + nz).get(3)).contains(rz) && (NY.get(rg + rz).get(2) + NY.get(rg + rz).get(3)).contains(nz))
            nianrihuhuan = Z201;
        if ((NY.get(sg + sz).get(2) + NY.get(sg + sz).get(3)).contains(rz) && (NY.get(rg + rz).get(2) + NY.get(rg + rz).get(3)).contains(sz))
            rishihuhuan = Z202;
        String ysidakongwang = "", rsidakongwang = "", ssidakongwang = "";
        if ((NY.get(ng + nz).get(10)).contains("子") || NY.get(ng + nz).get(10).contains("午")) {
            if ((NY.get(yg + yz).get(0)).contains("水")) {
                ysidakongwang = Z203;
            }
            if ((NY.get(rg + rz).get(0)).contains("水")) {
                rsidakongwang = Z203;
            }
            if ((NY.get(sg + sz).get(0)).contains("水")) {
                ssidakongwang = Z203;
            }
        }
        if (NY.get(ng + nz).get(10).contains("寅") || NY.get(ng + nz).get(10).contains("申")) {
            if ((NY.get(yg + yz).get(0)).contains("金")) {
                ysidakongwang = Z203;
            }
            if (NY.get(rg + rz).get(0).contains("金")) {
                rsidakongwang = Z203;
            }
            if (NY.get(sg + sz).get(0).contains("金")) {
                ssidakongwang = Z203;
            }
        }
        String dexiuguiren = "";
        if ("寅午戌".contains(yz) && ztg.contains("戊") && ztg.contains("癸")) {
            if (ztg.contains("丙") || ztg.contains("丁")) dexiuguiren = Z206;
        }
        if ("申子辰".contains(yz) && ztg.contains("丙") && ztg.contains("辛")) {
            if (ztg.contains("壬") || ztg.contains("癸") || ztg.contains("戊") || ztg.contains("己")) dexiuguiren = Z206;
        }
        if ("申子辰".contains(yz) && ztg.contains("甲") && ztg.contains("己")) {
            if (ztg.contains("壬") || ztg.contains("癸") || ztg.contains("戊") || ztg.contains("己")) dexiuguiren = Z206;
        }
        if ("巳酉丑".contains(yz) && ztg.contains("乙") && ztg.contains("庚")) {
            if (ztg.contains("庚") || ztg.contains("辛")) dexiuguiren = Z206;
        }
        if ("亥卯未".contains(yz) && ztg.contains("丁") && ztg.contains("壬")) {
            if (ztg.contains("甲") || ztg.contains("乙")) dexiuguiren = Z206;
        }
        LinkedHashMap<String, String> guanfu = new LinkedHashMap<String, String>() {{
            put("子辰", Z205);
            put("丑巳", Z205);
            put("寅午", Z205);
            put("卯未", Z205);
            put("辰申", Z205);
            put("巳酉", Z205);
            put("午戌", Z205);
            put("未亥", Z205);
            put("申子", Z205);
            put("酉丑", Z205);
            put("戌寅", Z205);
            put("亥卯", Z205);
        }};
        LinkedHashMap<String, String> guixian = new LinkedHashMap<String, String>() {{
            put("火", "甲申乙酉癸亥");
            put("金", "乙亥戊子己丑");
            put("水", "戊寅己卯丁巳");
            put("土", "庚寅辛卯丁巳");
            put("木", "辛巳甲午壬申");
        }};
        String YZ1 = "", RZ10 = "", SZ8 = "";
        if (guixian.getOrDefault(NYWX,"guixian").contains(yg + yz)) {
            YZ1 = Z215;
        }
        if (guixian.getOrDefault(NYWX,"guixian").contains(rg + rz)) {
            RZ10 = Z215;
        }
        if (guixian.getOrDefault(NYWX,"guixian").contains(sg + sz)) {
            SZ8 = Z215;
        }
        String guixian2 = "";
        if (NYWX.equals("金") && "庚午".contains(sg + sz)) {
            guixian2 = Z216;
        }
        if (NYWX.equals("火") && "丁丑".contains(sg + sz)) {
            guixian2 = Z216;
        }
        if (NYWX.equals("木") && "甲子乙巳".contains(sg + sz)) {
            guixian2 = Z216;
        }
        if (NYWX.equals("水") && "癸酉".contains(sg + sz)) {
            guixian2 = Z216;
        }
        if (NYWX.equals("土") && "己卯己亥".contains(sg + sz)) {
            guixian2 = Z216;
        }
        String tz = "";
        String[] NZS = {huagai.get(nz+rz), huagai.get(nz+nz), ciguan.get(rg+ng+nz), tiandeguiren.get(yz+nz), tiandeguiren.get(yz+ng), tiandehe.get(yz+nz), tiandehe.get(yz+ng), yuedeguiren.get(yz+ng), jiangxing.get(nz+rz), jiangxing.get(nz+nz), jiesha.get(nz+rz), xianchi.get(nz+rz), feiren.get(rg+yz+nz), feiren.get(rg+rz+nz), feiren.get(rg+sz+nz), yima.get(nz+rz), wangshen.get(nz+rz), tianyi.get(nz+yz), yinzhuyangsho.get(nz+yz), fuxingguiren.get(nz+ng), fuxingguiren.get(nz+rg), taijiguiren.get(nz+ng), taijiguiren.get(nz+rg), tianchuguiren.get(nz+ng), tianchuguiren.get(nz+rg), wenchangguiren.get(nz+rg), guoyinguiren.get(nz+ng), guoyinguiren.get(nz+rg), tianguanguiren.get(nz+ng), tianguanguiren.get(nz+rg), hongyan.get(nz+rg), jinyu.get(nz+ng), jinyu.get(nz+rg), tianyiguiren.get(nz+rg), tianyiguiren.get(nz+ng), yangren.get(nz+rg), lushen.get(nz+rg), liuxia.get(nz+rg), sanqiguiren.get(ng+yg+rg), xueren.get(yz+nz), NZ4};
        String[] YZS = {baihujianren.get(nz+yz), baihujianren.get(nz+yg+yz), ciguan.get(ng+yg+yz), ciguan.get(rg+yg+yz), tiandeguiren.get(yz+yg), tiandehe.get(yz+yg), yuedeguiren.get(yz+yg), jiangxing.get(yz+rz), jiangxing.get(yz+nz), sangmen.get(nz+yz), pitosha.get(nz+yz), liuer.get(yz+nz), zaisha.get(yz+nz), huagai.get(yz+nz), huagai.get(yz+rz), jiesha.get(yz+nz), jiesha.get(yz+rz), hongluan.get(yz+nz), xianchi.get(yz+nz), xianchi.get(yz+rz), guasu.get(yz+nz), diaoke.get(nz+yz), guchen.get(yz+nz), tianxi.get(nz+yz), yima.get(yz+nz), yima.get(yz+rz), wangshen.get(yz+nz), pima.get(nz+yz), yuanchen.get(nz+yz), fuxingguiren.get(yz+ng), fuxingguiren.get(yz+rg), taijiguiren.get(yz+ng), taijiguiren.get(yz+rg), tianchuguiren.get(yz+ng), tianchuguiren.get(yz+rg), wenchangguiren.get(yz+rg), guoyinguiren.get(yz+ng), guoyinguiren.get(yz+rg), tianguanguiren.get(yz+ng), tianguanguiren.get(yz+rg), hongyan.get(yz+rg), jinyu.get(yz+ng), jinyu.get(yz+rg), tianyiguiren.get(yz+rg), tianyiguiren.get(yz+ng), yangren.get(yz+rg), lushen.get(yz+rg), liuxia.get(yz+rg), feiren.get(rg+nz+yz), feiren.get(rg+rz+yz), feiren.get(rg+sz+yz), wangshen.get(yz+rz), xuetang.get(NYWX+yg), xuetang.get(NYWX+yz), YZ2, dexiuguiren};
        String[] RZS = {baihujianren.get(nz+rz), baihujianren.get(nz+rg+rz), tianshe.get(yz+rg+rz), yinyangchacuo.get(rg+rz), guigangguiren.get(rg+rz), jinshen.get(rg+rz), guluansha.get(rg+rz), ciguan.get(ng+rg+rz), tiandeguiren.get(yz+rz), tiandeguiren.get(yz+rg), tiandehe.get(yz+rz), tiandehe.get(yz+rg), yuedeguiren.get(yz+rg), jiangxing.get(rz+nz), jiangxing.get(rz+rz), sangmen.get(nz+rz), pitosha.get(nz+rz), liuer.get(rz+nz), zaisha.get(rz+nz), huagai.get(rz+nz), huagai.get(rz+rz), jiesha.get(rz+nz), hongluan.get(rz+nz), xianchi.get(rz+nz), guasu.get(rz+nz), diaoke.get(nz+rz), tianxi.get(nz+rz), yima.get(rz+nz), pima.get(nz+rz), tianyi.get(rz+yz), yuanchen.get(nz+rz), yinzhuyangsho.get(rz+yz), fuxingguiren.get(rz+ng), fuxingguiren.get(rz+rg), taijiguiren.get(rz+ng), taijiguiren.get(rz+rg), tianchuguiren.get(rz+ng), tianchuguiren.get(rz+rg), wenchangguiren.get(rz+rg), guoyinguiren.get(rz+ng), guoyinguiren.get(rz+rg), tianguanguiren.get(rz+ng), tianguanguiren.get(rz+rg), hongyan.get(rz+rg), jinyu.get(rz+ng), jinyu.get(rz+rg), tianyiguiren.get(rz+rg), tianyiguiren.get(rz+ng), yangren.get(rz+rg), lushen.get(rz+rg), liuxia.get(rz+rg), feiren.get(rg+nz+rz), feiren.get(rg+yz+rz), feiren.get(rg+sz+rz), rideguiren.get(rz+rg), guchen.get(rz+nz), wangshen.get(rz+nz), liuxiuri.get(rg+rz), bazhuanri.get(rg+rz), jiucho.get(rg+rz), gonglv.get(rg+rz+sg+sz), xuetang.get(NYWX+rg), xuetang.get(NYWX+rz), xueren.get(yz+rz), RZ2, RZ3, RZ5, RZ6, RZ11};
        String[] SZS = {baihujianren.get(nz+sz), baihujianren.get(nz+sg+sz), jinshen.get(sg+sz), jinshen.get(rg+sz), ciguan.get(rg+sg+sz), tiandeguiren.get(yz+sz), tiandeguiren.get(yz+sg), tiandehe.get(yz+sz), tiandehe.get(yz+sg), yuedeguiren.get(yz+sg), jiangxing.get(sz+rz), jiangxing.get(sz+nz), sangmen.get(nz+sz), pitosha.get(nz+sz), liuer.get(sz+nz), zaisha.get(sz+nz), huagai.get(sz+nz), huagai.get(sz+rz), jiesha.get(sz+nz), jiesha.get(sz+rz), hongluan.get(sz+nz), xianchi.get(sz+rz), guasu.get(sz+nz), diaoke.get(nz+sz), guchen.get(sz+nz), tianxi.get(nz+sz), yima.get(sz+nz), yima.get(sz+rz), wangshen.get(sz+nz), pima.get(nz+sz), tianyi.get(sz+yz), yuanchen.get(nz+sz), yinzhuyangsho.get(sz+yz), fuxingguiren.get(sz+ng), fuxingguiren.get(sz+rg), taijiguiren.get(sz+ng), taijiguiren.get(sz+rg), tianchuguiren.get(sz+ng), tianchuguiren.get(sz+rg), wenchangguiren.get(sz+rg), guoyinguiren.get(sz+ng), guoyinguiren.get(sz+rg), tianguanguiren.get(sz+ng), tianguanguiren.get(sz+rg), hongyan.get(sz+rg), jinyu.get(sz+ng), jinyu.get(sz+rg), tianyiguiren.get(sz+rg), tianyiguiren.get(sz+ng), yangren.get(sz+rg), lushen.get(sz+rg), feiren.get(rg+nz+sz), feiren.get(rg+yz+sz), feiren.get(rg+rz+sz), ciguan.get(ng+sg+sz), xianchi.get(sz+nz), wangshen.get(sz+rz), SZ1, xueren.get(yz+sz)};
        String[] NZSS = new String[]{};
        String[] YZSS = new String[]{};
        String[] RZSS = new String[]{};
        String[] SZSS = new String[]{};
        if (zhuanyeban.equals("vip")) {
        NZSS = new String[]{wuguixing.get(nz+yz), shuinisha.get(nz+rg), tiansaoxing.get(rg+ng), tiansaoxing.get(rg+nz), pingtosha.get(ng+nz), xuanliangguan.get(ng+nz), kujiao.get(tz+nz), gusuipo.get(tz+nz), tiesaozho.get(nz+tz), zhibixi.get(tz+nz), posuisha.get(yz+nz), huodeguiren.get(yz+ng), doniusha.get(rg+rz+nz), huotong.get(yz+nz), diyu.get(yz+nz), wuguijingshensha.get(NYWX+nz), caifengsha.get(yz+ng), musha.get(rg+ng+nz), duhuo.get(yz+nz), jiangjungong.get(nz+sz), jiangjungong.get(sz+nz), tianzaisha.get(ng+rg), NZ1, NZ2, NZ5, NZ6, NZ7, NZ8, NZ9, fuqisha, tingtangsha, huagaizimu.get(ng+nz+nz), huagaizimu.get(ng+nz+rz), sanqiuwumu.get(yz+ng+nz)};
        YZSS = new String[]{zhibixi.get(yz+nz), bingfu.get(yz+nz), maiersha.get(yz+nz), gojiaosha.get(yz+nz), sifu.get(yz+nz), tiesaozho.get(nz+yz), ziyisha.get(yz+nz), shuinisha.get(yz+rg), juehuoyan.get(nz+yz), kujiao.get(yz+nz), fuchensha.get(nz+yz), gusuipo.get(yz+nz), bingxiaowajie.get(yz+nz), zhibeisha.get(nz+yz), polv.get(nz+yz), huodeguiren.get(yz+yg), doniusha.get(rg+rz+yz), caifengsha.get(yz+yg), panan.get(nz+yz), musha.get(rg+yg+yz), jiangjungong.get(yz+sz), jiangjungong.get(sz+yz), tiebansha.get(rg+yz), tiansaoxing.get(rg+yg), tiansaoxing.get(rg+yz), disaoxing.get(NYWX+yz), pingtosha.get(yg+yz), xuanliangguan.get(yg+yz), xuezhi.get(nz+yz), guanyunguiren.get(ng+yg), liuqinguiren.get(yz+rg+sg), liuqinguiren.get(yz+sg+rg), zhangshngsha.get(yz+rz+sz), YZ1, YZ3, YZ4, wangmenguasha, zaijiasha.get(nz+yz), ysidakongwang, huagaizimu.get(yg+yz+nz), huagaizimu.get(yg+yz+rz), sanqiuwumu.get(yz+yg+yz), guanfu.get(nz+yz)};
        RZSS = new String[]{tianzhuansha.get(yz+rg+rz), dizhuansha.get(yz+rg+rz), fuchensha.get(nz+rz), bingfu.get(rz+nz), gojiaosha.get(rz+nz), sifu.get(rz+nz), tongziming.get(NYWX+rz), maiersha.get(rz+nz), shuinisha.get(rz+rg), duhuo.get(yz+rz), ziyisha.get(rz+nz), wuguixing.get(rz+yz), zhibeisha.get(nz+rz), posuisha.get(yz+rz), polv.get(nz+rz), huodeguiren.get(yz+rg), yinyangsha.get(rz+rg), tongziming.get(yz+rz), xuanliangguan.get(rg+rz), xuanliangsha.get(rg+rz), huotong.get(yz+rz), tiantusha.get(rz+sz), tiantusha.get(sz+rz), tulaoguan.get(rg+rz), caifengsha.get(yz+rg), panan.get(nz+rz), diyu.get(yz+rz), jiangjungong.get(rz+sz), jiangjungong.get(sz+rz), fanghaisha.get(rg+rz), qingguoqingcheng.get(rg+rz), guluanguaquesha.get(rg+rz), pingtosha.get(rg+rz), xuezhi.get(nz+rz), guanyunguiren.get(ng+rg), qigaiguiren.get(yz+rg+rz), qigaiguiren.get(yz+rg), qigaiguiren.get(yz+rz), caishenguiren.get(yz+rg), caishenguiren.get(yz+rz), luoti.get(rg+rz), pinqiongsha.get(yz+rg), pinqiongsha.get(yz+rg+rz), RZ1, RZ4, RZ7, RZ8, RZ9, RZ10, hongshari, huangshari, tiannanri, qiongkuri, weixieri, wuhosha, anjinsha, nianrihuhuan, rishihuhuan, rsidakongwang, huagaizimu.get(rg+rz+rz), huagaizimu.get(rg+rz+nz), sanqiuwumu.get(yz+rg+rz), guanfu.get(nz+rz)};
        SZSS = new String[]{bingfu.get(sz+nz), fuchensha.get(nz+sz), gojiaosha.get(sz+nz), sifu.get(sz+nz), maiersha.get(sz+nz), ziyisha.get(sz+nz), wuguixing.get(sz+yz), duhuo.get(yz+sz), jiucho.get(sg+sz), zhibeisha.get(nz+sz), posuisha.get(yz+sz), polv.get(nz+sz), doniusha.get(rg+rz+sz), huotong.get(yz+sz), caifengsha.get(yz+sg), panan.get(nz+sz), musha.get(rg+sg+sz), tongziming.get(yz+sz), shangsisha.get(rz+sz), tongziming.get(NYWX+sz), tanghuoguan.get(nz+sz), huodeguiren.get(yz+sg), duanqiaoguan.get(yz+sz), leigongguan.get(rg+sz), tiandiaoguan.get(nz+sz), sijiguan.get(yz+sg+sz), qianriguan.get(rg+sz), duanmingguan.get(nz+sz), duanchangguan.get(rg+sz), sizhuguan.get(yz+sz), zhuangmingguan.get(nz+sz), tianxingsha.get(nz+sg), luojingguan.get(rg+sz), diyu.get(yz+sz), xuetang.get(NYWX+sg), xuetang.get(NYWX+sz), yanluoguan.get(yz+sz), jiangjunjian.get(yz+sz), tiesuoguan.get(yz+sz), niangniangguan.get(yz+sz), gejiaosha.get(rz+sz), tiansaoxing.get(rg+sg), tiansaoxing.get(rg+sz), tianhao.get(yz+sz), pingtosha.get(sg+sz), xuanliangguan.get(sg+sz), shuinisha.get(sz+rg), liuxia.get(sz+rg), ziyishasj.get(nz+sz), xuezhi.get(nz+sz), SZ2, wuguiguan.get(nz+sz), yuanjutaohuajie.get(rz+sz), jijiaoguan.get(yz+sz), jinsuoguan.get(yz+sz), guanyunguiren.get(ng+sg), zhentaohua.get(rg+sz), zhengtaohua.get(rg+sz), guafusha.get(rg+sz), SZ3, SZ4, gejuguan, toshengsha, jielukongwang, tundansha.get(rz+sz), saotiechuang, jueliangsha.get(yz+sz), tieqiusha.get(ng+sz), xueguangguan.get(yz+sz), zhuqueguan, yupenguan, lianzhuren, rentogui, rentocai, limusha, lifusha, ssidakongwang, SZ5, SZ6, guimenguan.get(nz+sz), huagaizimu.get(sg+sz+nz), huagaizimu.get(sg+sz+rz), sanqiuwumu.get(yz+sg+sz), guanfu.get(nz+sz), SZ7, SZ8, guixian2, SZ9, SZ10, SZ11, SZ12};
        }
        NZS = arrayMerge(NZS, NZSS);
        YZS = arrayMerge(YZS, YZSS);
        RZS = arrayMerge(RZS, RZSS);
        SZS = arrayMerge(SZS, SZSS);
        String[] NZSC = CommonUtil.arrayHandle(NZS);
        String[] YZSC = CommonUtil.arrayHandle(YZS);
        String[] RZSC = CommonUtil.arrayHandle(RZS);
        String[] SZSC = CommonUtil.arrayHandle(SZS);
        String[] tiankedichong = {"甲子庚午", "乙丑辛未", "丙寅壬申", "丁卯癸酉", "戊辰甲戌", "己巳乙亥", "庚午丙子", "辛未丁丑", "壬申戊寅", "癸酉己卯", "甲戌庚辰", "乙亥辛巳", "丙子壬午", "丁丑癸未", "戊寅甲申", "己卯乙酉", "庚辰丙戌", "辛巳丁亥", "壬午戊子", "癸未己丑", "甲申庚寅", "乙酉辛卯", "丙戌壬辰", "丁亥癸巳", "戊子甲午", "己丑乙未", "庚寅丙申", "辛卯丁酉", "壬辰戊戌", "癸巳己亥", "甲午庚子", "乙未辛丑", "丙申壬寅", "丁酉癸卯", "戊戌甲辰", "己亥乙巳", "庚子丙午", "辛丑丁未", "壬寅戊申", "癸卯己酉", "甲辰庚戌", "乙巳辛亥", "丙午壬子", "丁未癸丑", "戊申甲寅", "己酉乙卯", "庚戌丙辰", "辛亥丁巳", "壬子戊午", "癸丑己未", "甲寅庚申", "己卯辛酉", "丙辰壬戌", "丁巳癸亥", "戊午甲子", "己未己丑", "庚申丙寅", "辛酉丁卯", "壬戌戊辰", "癸亥己巳"};
        List<LinkedHashMap<String, String>> MDLX = new ArrayList<LinkedHashMap<String, String>>() {{
            add(new LinkedHashMap<String, String>() {{
                put("甲", "戊辰");
                put("己", "戊辰");
                put("乙", "戊寅");
                put("庚", "戊寅");
                put("丙", "甲午");
                put("辛", "甲午");
                put("丁", "庚戌");
                put("壬", "庚戌");
                put("戊", "甲寅");
                put("癸", "甲寅");
            }});
            add(new LinkedHashMap<String, String>() {{
                put("甲", "丙子");
                put("己", "丙子");
                put("乙", "甲申");
                put("庚", "甲申");
                put("丙", "戊戌");
                put("辛", "戊戌");
                put("丁", "壬子");
                put("壬", "壬子");
                put("戊", "甲寅");
                put("癸", "甲寅");
            }});
        }};
        int nmgd = arraySearch(ng + nz, LLXS);
        int rmgdz = arraySearch(MDLX.get(0).get(rg), LLXS);
        int smgdz = arraySearch(MDLX.get(1).get(sg), LLXS);
        String LZ1 = "", LZ2 = "", LZ101 = "", nianyunhuhuan = "", lsidakongwang = "";
        int k = 0;
        LinkedHashMap<String, Object> LZSC = new LinkedHashMap<>();
        for (String ssc : LLXS) {
            String lg = ssc.substring(0, 1);
            String lz = ssc.substring(ssc.length() - 1);
            LZ1=null;
            LZ2=null;LZ101=null;jielukongwang=null;anjinsha=null;nianyunhuhuan=null;lsidakongwang=null;
            if ((ng + nz).equals(lg + lz)) {
                LZ1 = Z190;
            }
            if ((NY.get(rg + rz).get(2) + NY.get(rg + rz).get(3)).contains(lz)) LZ2 = Z149;
            if (rg.equals("甲") && (ztg + zzg).contains("丙"))
                if (lg.equals("壬") || lz.equals("申") || lz.equals("亥")) LZ101 = Z191;
            if (rg.equals("乙") && (ztg + zzg).contains("丁"))
                if (lg.equals("癸") || lz.equals("子") || lz.equals("丑") || lz.equals("辰")) LZ101 = Z191;
            if (rg.equals("丙") && (ztg + zzg).contains("戊"))
                if (lg.equals("甲") || lz.equals("寅") || lz.equals("亥")) LZ101 = Z193;
            if (rg.equals("丁") && (ztg + zzg).contains("己"))
                if (lg.equals("乙") || lz.equals("卯") || lz.equals("辰") || lz.equals("未")) LZ101 = Z193;
            if (rg.equals("戊") && (ztg + zzg).contains("庚"))
                if (lg.equals("丙") || lz.equals("寅") || lz.equals("巳")) LZ101 = Z195;
            if (rg.equals("己") && (ztg + zzg).contains("辛"))
                if (lg.equals("丁") || lz.equals("午") || lz.equals("未") || lz.equals("戌")) LZ101 = Z195;
            if (rg.equals("庚") && (ztg + zzg).contains("壬"))
                if (lg.equals("戊") || lz.equals("寅") || lz.equals("辰") || lz.equals("申") || lz.equals("戌"))
                    LZ101 = Z194;
            if (rg.equals("辛") && (ztg + zzg).contains("癸"))
                if (lg.equals("己") || lz.equals("丑") || lz.equals("午") || lz.equals("未")) LZ101 = Z194;
            if (rg.equals("壬") && (ztg + zzg).contains("甲"))
                if (lg.equals("庚") || lz.equals("申") || lz.equals("巳")) LZ101 = Z192;
            if (rg.equals("癸") && (ztg + zzg).contains("乙"))
                if (lg.equals("辛") || lz.equals("丑") || lz.equals("酉") || lz.equals("戌")) LZ101 = Z192;
            if ("甲己".contains(rg) && "申酉".contains(lz)) jielukongwang = Z178;
            if ("乙庚".contains(rg) && "午未".contains(lz)) jielukongwang = Z178;
            if ("丙辛".contains(rg) && "辰巳".contains(lz)) jielukongwang = Z178;
            if ("丁壬".contains(rg) && "寅卯".contains(lz)) jielukongwang = Z178;
            if ("戊癸".contains(rg) && "子丑".contains(lz)) jielukongwang = Z178;
            if ("子午卯酉".contains(nz) && lz.equals("巳")) anjinsha = Z181;
            if ("寅申巳亥".contains(nz) && lz.equals("酉")) anjinsha = Z181;
            if ("辰戌丑未".contains(nz) && lz.equals("丑")) anjinsha = Z181;
            String yueyunhuhuan = "", riyunhuhuan = "", shiyunhuhuan = "";
            if ((NY.get(ng + nz).get(2) + NY.get(ng + nz).get(3)).contains(lz) && (NY.get(lg + lz).get(2) + NY.get(lg + lz).get(3)).contains(nz))
                nianyunhuhuan = Z196;
            if ((NY.get(yg + yz).get(2) + NY.get(yg + yz).get(3)).contains(lz) && (NY.get(lg + lz).get(2) + NY.get(lg + lz).get(3)).contains(yz))
                yueyunhuhuan = Z197;
            if ((NY.get(rg + rz).get(2) + NY.get(rg + rz).get(3)).contains(lz) && (NY.get(lg + lz).get(2) + NY.get(lg + lz).get(3)).contains(rz))
                riyunhuhuan = Z198;
            if ((NY.get(sg + sz).get(2) + NY.get(sg + sz).get(3)).contains(lz) && (NY.get(lg + lz).get(2) + NY.get(lg + lz).get(3)).contains(sz))
                shiyunhuhuan = Z199;
            if (NY.get(ng + nz).get(10).contains("子") || NY.get(ng + nz).get(10).contains("午")) {
                if (NY.get(lg + lz).get(0).contains("水")) {
                    lsidakongwang = Z203;
                }
            }
            if (NY.get(ng + nz).get(10).contains("寅") || NY.get(ng + nz).get(10).contains("申")) {
                if (NY.get(lg + lz).get(0).contains("金")) {
                    lsidakongwang = Z203;
                }
            }
            int index = (60 - nmgd + k + rmgdz) % 60;
            String RM = LLXS[index];
            String SM = LLXS[(120 - k + nmgd + smgdz) % 60];
            List<String> tiankedichongList = Arrays.asList(tiankedichong);
            String madaoluxie = "", lumatongcao = "", ntiankedichong = "", ytiankedichong = "", rtiankedichong = "", stiankedichong = "", zhuihunchandu = "";
            if (tiankedichongList.contains(RM + SM) || tiankedichongList.contains(SM + RM)) {
                madaoluxie = Z207;
            }
            if (RM.equals(SM) && RM.equals(lg + lz)) {
                lumatongcao = Z220;
            }
            if (tiankedichongList.contains(ng + nz + lg + lz) || tiankedichongList.contains(lg + lz + ng + nz)) {
                ntiankedichong = Z208;
            }
            if (tiankedichongList.contains(yg + yz + lg + lz) || tiankedichongList.contains(lg + lz + yg + yz)) {
                ytiankedichong = Z209;
            }
            if (tiankedichongList.contains(rg + rz + lg + lz) || tiankedichongList.contains(lg + lz + rg + rz)) {
                rtiankedichong = Z210;
            }
            if (tiankedichongList.contains(sg + sz + lg + lz) || tiankedichongList.contains(lg + lz + sg + sz)) {
                stiankedichong = Z211;
            }

            String[][] zhuihunchandus = {{"未申", "丑寅", "甲己"}, {"卯辰", "酉戌", "乙庚"}, {"寅丑", "申未", "丙辛"}, {"亥子", "申未", "丁壬"}, {"酉戌", "巳午", "戊癸"}};
            if (zhuihunchandus[0][2].contains(ng) && zhuihunchandus[0][sex].contains(lz)) {
                zhuihunchandu = Z212;
            }
            if (zhuihunchandus[1][2].contains(ng) && zhuihunchandus[1][sex].contains(lz)) {
                zhuihunchandu = Z213;
            }
            if (zhuihunchandus[2][2].contains(ng) && zhuihunchandus[2][sex].contains(lz)) {
                zhuihunchandu = Z213;
            }
            if (zhuihunchandus[3][2].contains(ng) && zhuihunchandus[3][sex].contains(lz)) {
                zhuihunchandu = Z214;
            }
            if (zhuihunchandus[4][2].contains(ng) && zhuihunchandus[4][sex].contains(lz)) {
                zhuihunchandu = Z214;
            }
            String guixian1 = "", dayunchongdi = "";
            if (guixian.getOrDefault(NYWX,"guixian").contains(lg + lz)) {
                guixian1 = Z215;
            }
            if ((yz + lz).equals("子午") || (yz + lz).equals("丑未") || (yz + lz).equals("寅申") || (yz + lz).equals("辰戌") || (yz + lz).equals("卯酉") || (yz + lz).equals("巳亥") || (lz + yz).equals("子午") || (lz + yz).equals("丑未") || (lz + yz).equals("寅申") || (lz + yz).equals("辰戌") || (lz + yz).equals("卯酉") || (lz + yz).equals("巳亥")) {
                dayunchongdi = Z217;
            }
            LinkedHashMap<String, List<String>> shiganbaiwang = new LinkedHashMap<String, List<String>>() {{
                put("甲", Arrays.asList("寅", "卯", "申"));
                put("乙", Arrays.asList("寅", "卯", "酉"));
                put("丙", Arrays.asList("巳", "午", "子"));
                put("丁", Arrays.asList("巳", "午", "亥"));
                put("戊", Arrays.asList("巳", "午", "寅"));
                put("己", Arrays.asList("巳", "午", "卯"));
                put("庚", Arrays.asList("申", "酉", "午"));
                put("辛", Arrays.asList("申", "酉", "巳"));
                put("壬", Arrays.asList("亥", "子", "辰戌"));
                put("癸", Arrays.asList("亥", "子", "丑未"));
            }};
            String shiganbaiwangc = "", suilinluma = "";
            if ((nz + yz + rz + sz).indexOf(shiganbaiwang.get(rg).get(0)) <= 0 && (nz + yz + rz + sz).indexOf(shiganbaiwang.get(rg).get(1)) <= 0 && shiganbaiwang.get(rg).get(2).contains(lz)) {
                shiganbaiwangc = Z218;
            }
            if (!madaoluxie.isEmpty()) {
                suilinluma = Z219;
            }
            if (!lumatongcao.isEmpty()) {
                suilinluma = Z219;
            }
            String[] LZS = {baihujianren.get(nz+lz), baihujianren.get(nz+lg+lz), ciguan.get(rg+lg+lz), tiandeguiren.get(yz+lz), tiandeguiren.get(yz+lg), tiandehe.get(yz+lz), tiandehe.get(yz+lg), yuedeguiren.get(yz+lg), jiangxing.get(lz+rz), jiangxing.get(lz+nz), sangmen.get(nz+lz), pitosha.get(nz+lz), liuer.get(lz+nz), zaisha.get(lz+nz), huagai.get(lz+nz), huagai.get(lz+rz), jiesha.get(lz+nz), jiesha.get(lz+rz), hongluan.get(lz+nz), xianchi.get(lz+rz), guasu.get(lz+nz), diaoke.get(nz+lz), guchen.get(lz+nz), tianxi.get(nz+lz), yima.get(lz+nz), yima.get(lz+rz), wangshen.get(lz+nz), pima.get(nz+lz), tianyi.get(lz+yz), yuanchen.get(nz+lz), yinzhuyangsho.get(lz+yz), fuxingguiren.get(lz+ng), fuxingguiren.get(lz+rg), taijiguiren.get(lz+ng), taijiguiren.get(lz+rg), tianchuguiren.get(lz+ng), tianchuguiren.get(lz+rg), wenchangguiren.get(lz+rg), guoyinguiren.get(lz+ng), guoyinguiren.get(lz+rg), tianguanguiren.get(lz+ng), tianguanguiren.get(lz+rg), hongyan.get(lz+rg), jinyu.get(lz+ng), jinyu.get(lz+rg), tianyiguiren.get(lz+rg), tianyiguiren.get(lz+ng), yangren.get(lz+rg), lushen.get(lz+rg), feiren.get(rg+nz+lz), feiren.get(rg+yz+lz), feiren.get(rg+rz+lz), ciguan.get(ng+lg+lz), xianchi.get(lz+nz), wangshen.get(lz+rz), xueren.get(yz+lz), LZ2};
            String[] LZSS = new String[]{};
            if (zhuanyeban.equals("vip")) {
                LZSS = new String[]{fantiango.get(nz+lz), zhitaisui.get(nz+lz), chongtaisui.get(nz+lz), xingtaisui.get(nz+lz), potaisui.get(nz+lz), haitaisui.get(nz+lz), bingfu.get(lz+nz), maiersha.get(lz+nz), fuchensha.get(nz+lz), duhuo.get(yz+lz), gojiaosha.get(lz+nz), sifu.get(lz+nz), ziyisha.get(lz+nz), wuguixing.get(lz+yz), shuinisha.get(lz+rg), liuxia.get(lz+rg), ziyishasj.get(nz+lz), zhibeisha.get(nz+lz), posuisha.get(yz+lz), polv.get(nz+lz), doniusha.get(rg+rz+lz), huotong.get(yz+lz), caifengsha.get(yz+lg), panan.get(nz+lz), musha.get(rg+lg+lz), shangsisha.get(rz+lz), huodeguiren.get(yz+lg), tianxingsha.get(nz+lg), diyu.get(yz+lz), xuetang.get(NYWX+lg), xuetang.get(NYWX+lz), jiangjungong.get(rz+lz), jiangjungong.get(lz+rz), tianhao.get(yz+lz), LZ1, xuezhi.get(nz+lz), LZ101, jielukongwang, anjinsha, tundansha.get(rz+lz), nianyunhuhuan, yueyunhuhuan, riyunhuhuan, shiyunhuhuan, lsidakongwang, guanfu.get(nz+lz), madaoluxie, ntiankedichong, ytiankedichong, rtiankedichong, stiankedichong, zhuihunchandu, guixian1, dayunchongdi, shiganbaiwangc, lumatongcao, suilinluma};
            }
            LZS = arrayMerge(LZS, LZSS);
            LZS = CommonUtil.arrayHandle(LZS);
            LZSC.put(ssc, LZS);
            k++;
        }
        return Arrays.asList(NZSC, YZSC, RZSC, SZSC, LZSC);
    }

    public static int substrCount(String str, String subStr) {
        if (subStr.isEmpty()) {
            return 0;
        }

        int count = 0;
        int fromIndex = 0;

        while ((fromIndex = str.indexOf(subStr, fromIndex)) != -1) {
            count++;
            fromIndex += subStr.length();
        }

        return count;
    }

    private static String[] arrayMerge(String[] arr1, String[] arra2) {
        ArrayList<String> mergedList = new ArrayList<>();
        mergedList.addAll(Arrays.asList(arr1));
        mergedList.addAll(Arrays.asList(arra2));

        // 将ArrayList转换回数组
        return mergedList.toArray(new String[0]);
    }

    public static Integer arraySearch(String value, String[] arr) {
        for (int i = 0; i < arr.length; i++) {
            if (value.equals(arr[i])) {
                return i;
            }
        }
        return null;
    }

}
